Renderer.renderTexture

Renders the scene graph, described by a tree of gsk.render_node.RenderNode instances, to a gdk.texture.Texture.

The renderer will acquire a reference on the gsk.render_node.RenderNode tree while the rendering is in progress.

If you want to apply any transformations to root, you should put it into a transform node and pass that node instead.

Parameters

root gsk.render_node.RenderNode
viewport graphene.rect.Rect

the section to draw or null to use root's bounds

Return Value

Type: gdk.texture.Texture

a gdk.texture.Texture with the rendered contents of root.