Class
GtkSnapshot
Description [src]
final class Gtk.Snapshot : Gdk.Snapshot
{
/* No available fields */
}
GtkSnapshot
assists in creating GskRenderNode
s 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
gtk_snapshot_pop()
to change the current node.
The typical way to obtain a GtkSnapshot
object is as an argument to
the Gtk.WidgetClass.snapshot
vfunc. If you need to create your own
GtkSnapshot
, use gtk_snapshot_new()
.
Instance methods
gtk_snapshot_append_cairo
Creates a new GskCairoNode
and appends it to the current
render node of snapshot
, without changing the current node.
gtk_snapshot_append_color
Creates a new render node drawing the color
into the
given bounds
and appends it to the current render node
of snapshot
.
gtk_snapshot_append_linear_gradient
Appends a linear gradient node with the given stops to snapshot
.
gtk_snapshot_append_node
Appends node
to the current render node of snapshot
,
without changing the current node.
gtk_snapshot_append_radial_gradient
Appends a radial gradient node with the given stops to snapshot
.
gtk_snapshot_append_repeating_linear_gradient
Appends a repeating linear gradient node with the given stops to snapshot
.
gtk_snapshot_append_repeating_radial_gradient
Appends a repeating radial gradient node with the given stops to snapshot
.
gtk_snapshot_append_scaled_texture
Creates a new render node drawing the texture
into the given bounds
and appends it to the
current render node of snapshot
.
since: 4.10
gtk_snapshot_append_texture
Creates a new render node drawing the texture
into the given bounds
and appends it to the
current render node of snapshot
.
gtk_snapshot_free_to_paintable
Returns a paintable for the node that was
constructed by snapshot
and frees snapshot
.
gtk_snapshot_gl_shader_pop_texture
Removes the top element from the stack of render nodes and
adds it to the nearest GskGLShaderNode
below it.
gtk_snapshot_pop
Removes the top element from the stack of render nodes, and appends it to the node underneath it.
gtk_snapshot_push_color_matrix
Modifies the colors of an image by applying an affine transformation in RGB space.
gtk_snapshot_push_cross_fade
Snapshots a cross-fade operation between two images with the
given progress
.
gtk_snapshot_push_fill
Fills the area given by path
and fill_rule
with an image and discards everything
outside of it.
unstable since: 4.14
gtk_snapshot_push_mask
Until the first call to gtk_snapshot_pop()
, the
mask image for the mask operation will be recorded.
since: 4.10
gtk_snapshot_push_stroke
Strokes the given path
with the attributes given by stroke
and
an image.
unstable since: 4.14
gtk_snapshot_render_background
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.
deprecated: 4.10
gtk_snapshot_render_focus
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.
deprecated: 4.10
gtk_snapshot_render_frame
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.
deprecated: 4.10
gtk_snapshot_render_insertion_cursor
Draws a text caret using snapshot
at the specified index of layout
.
deprecated: 4.10
gtk_snapshot_render_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.
deprecated: 4.10
gtk_snapshot_restore
Restores snapshot
to the state saved by a preceding call to
gtk_snapshot_save()
and removes that state from the stack of
saved states.
gtk_snapshot_rotate
Rotates @snapshot
‘s coordinate system by angle
degrees in 2D space -
or in 3D speak, rotates around the Z axis. The rotation happens around
the origin point of (0, 0) in the snapshot
‘s current coordinate system.
gtk_snapshot_to_paintable
Returns a paintable encapsulating the render node
that was constructed by snapshot
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.