Gdk.DrawingContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The clip region of the context |
||
r/w/co |
The window that created the context |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gdk.DrawingContext(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gdk.DrawingContext
is an object that represents the current drawing state of aGdk.Window
.It’s possible to use a
Gdk.DrawingContext
to draw on aGdk.Window
via rendering API like Cairo or OpenGL.A
Gdk.DrawingContext
can only be created by callingGdk.Window.begin_draw_frame
() and will be valid until a call toGdk.Window.end_draw_frame
().Gdk.DrawingContext
is 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 theGdk.DrawingContext
and should not be destroyed- Return type:
Retrieves a Cairo context to be used to draw on the
Gdk.Window
that created theGdk.DrawingContext
.The returned context is guaranteed to be valid as long as the
Gdk.DrawingContext
is valid, that is between a call toGdk.Window.begin_draw_frame
() andGdk.Window.end_draw_frame
().New in version 3.22.
- get_clip()[source]¶
- Returns:
a Cairo region
- Return type:
cairo.Region
orNone
Retrieves a copy of the clip region used when creating the self.
New in version 3.22.
- get_window()[source]¶
- Returns:
- Return type:
Retrieves the window that created the drawing self.
New in version 3.22.
- is_valid()[source]¶
-
Checks whether the given
Gdk.DrawingContext
is valid.New in version 3.22.
Property Details¶
- Gdk.DrawingContext.props.clip¶
- Name:
clip
- Type:
- Default Value:
- Flags:
The clip region applied to the drawing context.
New in version 3.22.
- Gdk.DrawingContext.props.window¶
- Name:
window
- Type:
- Default Value:
- Flags:
The
Gdk.Window
that created the drawing context.New in version 3.22.