Gnome::Gsk4::CairoNode
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
Description
A render node for a Cairo surface.
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
#-------------------------------------------------------------------------------
new-caironode
Creates a Gnome::Gsk4::RenderNode that will render a cairo surface
into the area given by $bounds.
You can draw to the cairo surface using .get-draw-context().
method new-caironode ( N-Object $bounds --> Gnome::Gsk4::CairoNode \)
$bounds; the rectangle to render to
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
Methods
#-------------------------------------------------------------------------------
get-draw-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.
method get-draw-context (--> N-Object )
Return value; a Cairo context used for drawing; use cairo_destroy() when done drawing.
#-------------------------------------------------------------------------------
get-surface
Retrieves the Cairo surface used by the render node.
method get-surface (--> N-Object )
Return value; a Cairo surface.