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
DrawingContextGidBuilder builder() static nothrowGet builder for [gdk.drawing_context.DrawingContext] Returns: New builder objectcairo.region.Region clip() @property nothrowGet `clip` property. Returns: The clip region applied to the drawing context.gdk.window.Window window() @property nothrowGet `window` property. Returns: The #GdkWindow that created the drawing context.cairo.context.Context getCairoContext() nothrowRetrieves a Cairo context to be used to draw on the #GdkWindow that created the #GdkDrawingContext.cairo.region.Region getClip() nothrowRetrieves a copy of the clip region used when creating the context. Returns: a Cairo regiongdk.window.Window getWindow() nothrowRetrieves the window that created the drawing context. Returns: a #GdkWindowbool isValid() nothrowChecks whether the given #GdkDrawingContext is valid. Returns: true if the context is validFluent builder implementation template for gdk.drawing_context.DrawingContext
Methods
T clip(cairo.region.Region propval) nothrowSet `clip` property. Params: propval = The clip region applied to the drawing context. Returns: Builder instance for fluent chainingT window(gdk.window.Window propval) nothrowSet `window` property. Params: propval = The #GdkWindow that created the drawing context. Returns: Builder instance for fluent chainingFluent builder for gdk.drawing_context.DrawingContext
Methods