Class: Gsk::CairoNode
- Inherits:
-
RenderNode
- Object
- RenderNode
- Gsk::CairoNode
- Defined in:
- (unknown)
Overview
A render node for a Cairo surface.
Instance Method Summary collapse
-
#draw_context ⇒ cairo::Context
Creates a Cairo context for drawing using the surface associated to the render node.
-
#initialize(bounds) ⇒ Gsk::CairoNode
constructor
Creates a
GskRenderNodethat will render a cairo surface into the area given by bounds. -
#surface ⇒ cairo::Surface
Retrieves the Cairo surface used by the render node.
Methods inherited from RenderNode
deserialize, #draw, #get_bounds, #node_type, #ref, #serialize, #unref, #write_to_file
Constructor Details
#initialize(bounds) ⇒ 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 [methodGsk.CairoNode.get_draw_context].
Instance Method Details
#draw_context ⇒ 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.
#surface ⇒ cairo::Surface
Retrieves the Cairo surface used by the render node.