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
GType _getGType() static nothrow
GType _gType() @property nothrow
DrawingContext self() nothrowReturns `this`, for use in `with` statements.
DrawingContextGidBuilder builder() static nothrowGet builder for [gdk.drawing_context.DrawingContext] Returns: New builder object
cairo.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 region
gdk.window.Window getWindow() nothrowRetrieves the window that created the drawing context. Returns: a #GdkWindow
bool isValid() nothrowChecks whether the given #GdkDrawingContext is valid. Returns: true if the context is valid
Constructors
this(void * ptr, Flag!"Take" take)

Fluent 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 chaining
T window(gdk.window.Window propval) nothrowSet `window` property. Params: propval = The #GdkWindow that created the drawing context. Returns: Builder instance for fluent chaining
Methods
DrawingContext build() nothrowCreate object from builder. Returns: New object