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.DrawingContextis an object that represents the current drawing state of aGdk.Window.It’s possible to use a
Gdk.DrawingContextto draw on aGdk.Windowvia rendering API like Cairo or OpenGL.A
Gdk.DrawingContextcan only be created by callingGdk.Window.begin_draw_frame() and will be valid until a call toGdk.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 theGdk.DrawingContextand should not be destroyed- Return type:
 
Retrieves a Cairo context to be used to draw on the
Gdk.Windowthat created theGdk.DrawingContext.The returned context is guaranteed to be valid as long as the
Gdk.DrawingContextis 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.RegionorNone
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.DrawingContextis 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.Windowthat created the drawing context.New in version 3.22.