gdk.drawing_context
Module for [DrawingContext] class
Types 3
#GdkDrawingContext is an object that represents the current drawing state of a #GdkWindow.
It's possible to use a #GdkDrawingContext to draw on a #GdkWindow via rendering API like Cairo or OpenGL.
A #GdkDrawingContext can only be created by calling [gdk.window.Window.beginDrawFrame] and will be valid until a call to [gdk.window.Window.endDrawFrame].
#GdkDrawingContext is available since GDK 3.22
Methods
DrawingContext self()Returns `this`, for use in `with` statements.DrawingContextGidBuilder builder()Get builder for [gdk.drawing_context.DrawingContext] Returns: New builder objectcairo.region.Region clip() @propertyGet `clip` property. Returns: The clip region applied to the drawing context.gdk.window.Window window() @propertyGet `window` property. Returns: The #GdkWindow that created the drawing context.cairo.context.Context getCairoContext()Retrieves a Cairo context to be used to draw on the #GdkWindow that created the #GdkDrawingContext.cairo.region.Region getClip()Retrieves a copy of the clip region used when creating the context. Returns: a Cairo regiongdk.window.Window getWindow()Retrieves the window that created the drawing context. Returns: a #GdkWindowbool isValid()Checks whether the given #GdkDrawingContext is valid. Returns: true if the context is validMethods
T clip(cairo.region.Region propval)Set `clip` property. Params: propval = The clip region applied to the drawing context. Returns: Builder instance for fluent chainingT window(gdk.window.Window propval)Set `window` property. Params: propval = The #GdkWindow that created the drawing context. Returns: Builder instance for fluent chainingFluent builder for [gdk.drawing_context.DrawingContext]
Methods