CairoNode#

class CairoNode(*args, **kwargs)#

Superclasses: RenderNode

A render node for a Cairo surface.

Constructors#

class CairoNode
classmethod new(bounds: Rect) CairoNode#

Creates a GskRenderNode that will render a cairo surface into the area given by bounds.

You can draw to the cairo surface using get_draw_context.

Parameters:

bounds – the rectangle to render to

Methods#

class CairoNode
get_draw_context() Context#

Creates a Cairo context for drawing using the surface associated to the render node.

If no surface exists yet, a surface will be created optimized for rendering to renderer.

get_surface() Surface#

Retrieves the Cairo surface used by the render node.