gsk.renderer

Module for Renderer class

Types 3

gsk.renderer.Renderer is a class that renders a scene graph defined via a tree of gsk.render_node.RenderNode instances.

Typically you will use a gsk.renderer.Renderer instance to repeatedly call gsk.renderer.Renderer.render to update the contents of its associated gdk.surface.Surface.

It is necessary to realize a gsk.renderer.Renderer instance using gsk.renderer.Renderer.realize before calling gsk.renderer.Renderer.render, in order to create the appropriate windowing system resources needed to render the scene.

Methods
GType _gType() @property
Renderer self()Returns `this`, for use in `with` statements.
RendererGidBuilder builder()Get builder for [gsk.renderer.Renderer] Returns: New builder object
bool realized() @propertyGet `realized` property. Returns: Whether the renderer has been associated with a surface or draw context.
gdk.surface.Surface surface() @propertyGet `surface` property. Returns: The surface associated with renderer.
gsk.renderer.Renderer newForSurface(gdk.surface.Surface surface)Creates an appropriate [gsk.renderer.Renderer] instance for the given surface.
gdk.surface.Surface getSurface()Retrieves the [gdk.surface.Surface] set using gsk_enderer_realize().
bool isRealized()Checks whether the renderer is realized or not. Returns: true if the [gsk.renderer.Renderer] was realized, and false otherwise
bool realize(gdk.surface.Surface surface = null)Creates the resources needed by the renderer to render the scene graph.
bool realizeForDisplay(gdk.display.Display display)Creates the resources needed by the renderer to render the scene graph.
void render(gsk.render_node.RenderNode root, cairo.region.Region region = null)Renders the scene graph, described by a tree of [gsk.render_node.RenderNode] instances to the renderer's surface, ensuring that the given region gets redrawn.
gdk.texture.Texture renderTexture(gsk.render_node.RenderNode root, graphene.rect.Rect viewport = null)Renders the scene graph, described by a tree of [gsk.render_node.RenderNode] instances, to a [gdk.texture.Texture].
void unrealize()Releases all the resources created by [gsk.renderer.Renderer.realize].
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gsk.renderer.Renderer

Fluent builder for gsk.renderer.Renderer

Methods
Renderer build()Create object from builder. Returns: New object