Gdk.DrawingContext - Classes - Gdk 3.0 (original) (raw)
g GObject.Object GObject.Object Gdk.DrawingContext Gdk.DrawingContext GObject.Object->Gdk.DrawingContext
Subclasses:
None
Methods¶
Inherited:
Structs:
get_cairo_context () |
---|
get_clip () |
get_window () |
is_valid () |
Virtual Methods¶
Inherited:
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:
Fields¶
Inherited:
Class Details¶
class Gdk.DrawingContext(**kwargs)¶
Bases:
Abstract:
No
Structure:
Gdk.DrawingContext is an object that represents the current drawing state of a Gdk.Window.
It’s possible to use a Gdk.DrawingContext to draw on a Gdk.Windowvia rendering API like Cairo or OpenGL.
A Gdk.DrawingContext can only be created by calling Gdk.Window.begin_draw_frame() and will be valid until a call to Gdk.Window.end_draw_frame().
Gdk.DrawingContext is available since GDK 3.22
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.Windowthat created the Gdk.DrawingContext.
The returned context is guaranteed to be valid as long as theGdk.DrawingContext is valid, that is between a call toGdk.Window.begin_draw_frame() and Gdk.Window.end_draw_frame().
New in version 3.22.
Returns:
a Cairo region
Return type:
cairo.Region or None
Retrieves a copy of the clip region used when creating the self.
New in version 3.22.
Returns:
Return type:
Retrieves the window that created the drawing self.
New in version 3.22.
Returns:
True if the context is valid
Return type:
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:
READABLE, WRITABLE, CONSTRUCT_ONLY
The clip region applied to the drawing context.
New in version 3.22.
Gdk.DrawingContext.props.window¶
Name:
window
Type:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The Gdk.Window that created the drawing context.
New in version 3.22.