CairoContext.cairoCreate

cairo.context.Context cairoCreate()

Retrieves a Cairo context to be used to draw on the [gdk.surface.Surface] of context.

A call to [gdk.draw_context.DrawContext.beginFrame] with this context must have been done or this function will return null.

The returned context is guaranteed to be valid until [gdk.draw_context.DrawContext.endFrame] is called.

Returns

a Cairo context

to draw on `GdkSurface