Top |
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_begin_draw_frame()
and will be valid until a call to gdk_window_end_draw_frame()
.
GdkDrawingContext is available since GDK 3.22
GdkWindow *
gdk_drawing_context_get_window (GdkDrawingContext *context
);
Retrieves the window that created the drawing context
.
Since: 3.22
cairo_region_t *
gdk_drawing_context_get_clip (GdkDrawingContext *context
);
Retrieves a copy of the clip region used when creating the context
.
Since: 3.22
cairo_t *
gdk_drawing_context_get_cairo_context (GdkDrawingContext *context
);
Retrieves a Cairo context to be used to draw on the GdkWindow that created the GdkDrawingContext.
The returned context is guaranteed to be valid as long as the
GdkDrawingContext is valid, that is between a call to
gdk_window_begin_draw_frame()
and gdk_window_end_draw_frame()
.
a Cairo context to be used to draw the contents of the GdkWindow. The context is owned by the GdkDrawingContext and should not be destroyed.
[transfer none]
Since: 3.22
gboolean
gdk_drawing_context_is_valid (GdkDrawingContext *context
);
Checks whether the given GdkDrawingContext is valid.
Since: 3.22
“clip”
property “clip” CairoRegion *
The clip region applied to the drawing context.
Owner: GdkDrawingContext
Flags: Read / Write / Construct Only
Since: 3.22