| Top |
| GdkWindow * | gdk_drawing_context_get_window () |
| cairo_region_t * | gdk_drawing_context_get_clip () |
| cairo_t * | gdk_drawing_context_get_cairo_context () |
| gboolean | gdk_drawing_context_is_valid () |
| CairoRegion * | clip | Read / Write / Construct Only |
| GdkDrawContext * | paint-context | Read / Write / Construct Only |
| GdkWindow * | window | Read / Write / Construct Only |
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 context
must have been
created without a GdkDrawContext for this function to work. If
gdk_drawing_context_get_paint_context() does not return NULL,
then this function will.
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. NULL is
returned when a paint context is in used.
[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.
Flags: Read / Write / Construct Only
Since: 3.22
“paint-context” property “paint-context” GdkDrawContext *
The GdkDrawContext used to draw or NULL if Cairo is used.
Flags: Read / Write / Construct Only
Since: 3.90