CairoContext

class CairoContext(**properties: Any)

Superclasses: DrawContext, Object

GdkCairoContext is an object representing the platform-specific draw context.

GdkCairoContext’s are created for a surface using create_cairo_context, and the context can then be used to draw on that surface.

Methods

class CairoContext
cairo_create() Context | None

Retrieves a Cairo context to be used to draw on the GdkSurface of context.

A call to begin_frame with this context must have been done or this function will return None.

The returned context is guaranteed to be valid until end_frame is called.