Note that calling cairo_reset_clip() on the resulting cairo.Context will
produce undefined results, so avoid it at all costs.
Typically, this function is used to draw on a Gdk.Window out of the paint
cycle of the toolkit; this should be avoided, as it breaks various assumptions
and optimizations.
If you are drawing on a native Gdk.Window in response to a Gdk.EventType.EXPOSE event
you should use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()
instead. GTK will automatically do this for you when drawing a widget.
Creates a Cairo context for drawing to
window.Note that calling
cairo_reset_clip()on the resulting cairo.Context will produce undefined results, so avoid it at all costs.Typically, this function is used to draw on a Gdk.Window out of the paint cycle of the toolkit; this should be avoided, as it breaks various assumptions and optimizations.
If you are drawing on a native Gdk.Window in response to a Gdk.EventType.EXPOSE event you should use
gdk_window_begin_draw_frame()andgdk_drawing_context_get_cairo_context()instead. GTK will automatically do this for you when drawing a widget.