Gdk.DrawingContext¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| get_cairo_context() | |
| get_clip() | |
| get_window() | |
| is_valid() | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| clip | cairo.Region | r/w/co | The clip region of the context | 
| window | Gdk.Window | r/w/co | The window that created the context | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Fields¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Gdk.DrawingContext(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Gdk.DrawingContextClass- Gdk.DrawingContextis an object that represents the current drawing state of a- Gdk.Window.- It’s possible to use a - Gdk.DrawingContextto draw on a- Gdk.Windowvia rendering API like Cairo or OpenGL.- A - Gdk.DrawingContextcan only be created by calling- Gdk.Window.begin_draw_frame() and will be valid until a call to- Gdk.Window.end_draw_frame().- Gdk.DrawingContextis available since GDK 3.22- 
get_cairo_context()[source]¶
- Returns: - a Cairo context to be used to draw the contents of the - Gdk.Window. The context is owned by the- Gdk.DrawingContextand should not be destroyed- Return type: - cairo.Context- Retrieves a Cairo context to be used to draw on the - Gdk.Windowthat created the- Gdk.DrawingContext.- The returned context is guaranteed to be valid as long as the - Gdk.DrawingContextis valid, that is between a call to- Gdk.Window.begin_draw_frame() and- Gdk.Window.end_draw_frame().- New in version 3.22. 
 - 
get_clip()[source]¶
- Returns: - a Cairo region - Return type: - cairo.Regionor- None- Retrieves a copy of the clip region used when creating the self. - New in version 3.22. 
 - 
get_window()[source]¶
- Returns: - a - Gdk.Window- Return type: - Gdk.Window- Retrieves the window that created the drawing self. - New in version 3.22. 
 - 
is_valid()[source]¶
- Returns: - Trueif the context is valid- Return type: - bool- Checks whether the given - Gdk.DrawingContextis valid.- New in version 3.22. 
 
- 
Property Details¶
- 
Gdk.DrawingContext.props.clip¶
- Name: - clip- Type: - cairo.Region- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The clip region applied to the drawing context. - New in version 3.22. 
- 
Gdk.DrawingContext.props.window¶
- Name: - window- Type: - Gdk.Window- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The - Gdk.Windowthat created the drawing context.- New in version 3.22.