Snapshot
GtkSnapshot
assists in creating class@Gsk.RenderNodes for widgets.
It functions in a similar way to a cairo context, and maintains a stack of render nodes and their associated transformations.
The node at the top of the stack is the one that gtk_snapshot_append_…()
functions operate on. Use the gtk_snapshot_push_…()
functions and method@Snapshot.pop to change the current node.
The typical way to obtain a GtkSnapshot
object is as an argument to the vfunc@Gtk.Widget.snapshot vfunc. If you need to create your own GtkSnapshot
, use ctor@Gtk.Snapshot.new.
Skipped during bindings generation
parameter
border_width
: Array parameter of type gfloat is not supportedparameter
stops
: Array parameter of type Gsk.ColorStop is not supportedparameter
stops
: Array parameter of type Gsk.ColorStop is not supportedparameter
stops
: Array parameter of type Gsk.ColorStop is not supportedparameter
stops
: Array parameter of type Gsk.ColorStop is not supportedparameter
stops
: Array parameter of type Gsk.ColorStop is not supportedmethod
push_debug
: Varargs parameter is not supportedparameter
shadow
: Array parameter of type Gsk.Shadow is not supported
Constructors
Functions
Creates a new class@Gsk.CairoNode and appends it to the current render node of @snapshot, without changing the current node.
Creates a new render node drawing the @color into the given @bounds and appends it to the current render node of @snapshot.
A convenience method to fill a path with a color.
Appends an inset shadow into the box given by @outline.
Creates render nodes for rendering @layout in the given foregound @color and appends them to the current node of @snapshot without changing the current node. The current theme's foreground color for a widget can be obtained with method@Gtk.Widget.get_color.
Appends @node to the current render node of @snapshot, without changing the current node.
Appends an outset shadow node around the box given by @outline.
Creates a new render node drawing the @texture into the given @bounds and appends it to the current render node of @snapshot.
A convenience method to stroke a path with a color.
Creates a new render node drawing the @texture into the given @bounds and appends it to the current render node of @snapshot.
Returns the node that was constructed by @snapshot and frees @snapshot.
Returns a paintable for the node that was constructed by @snapshot and frees @snapshot.
Removes the top element from the stack of render nodes and adds it to the nearest class@Gsk.GLShaderNode below it.
Applies a perspective projection transform.
Modifies the colors of an image by applying an affine transformation in RGB space.
Snapshots a cross-fade operation between two images with the given @progress.
Push a class@Gsk.GLShaderNode.
Modifies the opacity of an image.
Creates a node that repeats the child node.
Clips an image to a rounded rectangle.
Strokes the given @path with the attributes given by @stroke and an image.
Creates a render node for the CSS background according to @context, and appends it to the current node of @snapshot, without changing the current node.
Creates a render node for the focus outline according to @context, and appends it to the current node of @snapshot, without changing the current node.
Creates a render node for the CSS border according to @context, and appends it to the current node of @snapshot, without changing the current node.
Draws a text caret using @snapshot at the specified index of @layout.
Creates a render node for rendering @layout according to the style information in @context, and appends it to the current node of @snapshot, without changing the current node.
Restores @snapshot to the state saved by a preceding call to method@Snapshot.save and removes that state from the stack of saved states.
Returns a paintable encapsulating the render node that was constructed by @snapshot.
Transforms @snapshot's coordinate system with the given @matrix.
Translates @snapshot's coordinate system by @point.