| Top |
| CdkWindow * | cdk_drawing_context_get_window () |
| cairo_region_t * | cdk_drawing_context_get_clip () |
| cairo_t * | cdk_drawing_context_get_cairo_context () |
| gboolean | cdk_drawing_context_is_valid () |
CdkDrawingContext is an object that represents the current drawing state of a CdkWindow.
It's possible to use a CdkDrawingContext to draw on a CdkWindow via rendering API like Cairo or OpenGL.
A CdkDrawingContext can only be created by calling cdk_window_begin_draw_frame()
and will be valid until a call to cdk_window_end_draw_frame().
CdkDrawingContext is available since CDK 3.22
CdkWindow *
cdk_drawing_context_get_window (CdkDrawingContext *context);
Retrieves the window that created the drawing context
.
Since: 3.22
cairo_region_t *
cdk_drawing_context_get_clip (CdkDrawingContext *context);
Retrieves a copy of the clip region used when creating the context
.
Since: 3.22
cairo_t *
cdk_drawing_context_get_cairo_context (CdkDrawingContext *context);
Retrieves a Cairo context to be used to draw on the CdkWindow that created the CdkDrawingContext.
The returned context is guaranteed to be valid as long as the
CdkDrawingContext is valid, that is between a call to
cdk_window_begin_draw_frame() and cdk_window_end_draw_frame().
a Cairo context to be used to draw the contents of the CdkWindow. The context is owned by the CdkDrawingContext and should not be destroyed.
[transfer none]
Since: 3.22
gboolean
cdk_drawing_context_is_valid (CdkDrawingContext *context);
Checks whether the given CdkDrawingContext is valid.
Since: 3.22
“clip” property “clip” CairoRegion *
The clip region applied to the drawing context.
Owner: CdkDrawingContext
Flags: Read / Write / Construct Only
Since: 3.22