Gsk.CairoNode

g Gsk.CairoNode Gsk.CairoNode Gsk.RenderNode Gsk.RenderNode Gsk.RenderNode->Gsk.CairoNode

Subclasses:

None

Methods

Inherited:

Gsk.RenderNode (8)

class

new (bounds)

get_draw_context ()

get_surface ()

Virtual Methods

None

Fields

None

Class Details

class Gsk.CairoNode
Bases:

Gsk.RenderNode

Abstract:

No

A render node for a Cairo surface.

classmethod new(bounds)
Parameters:

bounds (Graphene.Rect) – the rectangle to render to

Returns:

A new GskRenderNode

Return type:

Gsk.CairoNode

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

You can draw to the cairo surface using [method`Gsk`.CairoNode.get_draw_context].

get_draw_context()
Returns:

a Cairo context used for drawing; use cairo_destroy() when done drawing

Return type:

cairo.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()
Returns:

a Cairo surface

Return type:

cairo.Surface

Retrieves the Cairo surface used by the render node.