Class

GtkSnapshot

Description [src]

final class Gtk.Snapshot : Gdk.Snapshot
{
  /* No available fields */
}

GtkSnapshot assists in creating GskRenderNodes 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().

Hierarchy

hierarchy this GtkSnapshot ancestor_0 GdkSnapshot ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Constructors

gtk_snapshot_new

Creates a new GtkSnapshot.

Instance methods

gtk_snapshot_append_border

Appends a stroked border rectangle inside the given outline.

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_conic_gradient

Appends a conic gradient node with the given stops to snapshot.

gtk_snapshot_append_fill

A convenience method to fill a path with a color.

since: 4.14

gtk_snapshot_append_inset_shadow

Appends an inset shadow into the box given by outline.

gtk_snapshot_append_layout
No description available.

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_outset_shadow

Appends an outset shadow node around the box given by outline.

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_stroke

A convenience method to stroke a path with a color.

since: 4.14

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_node

Returns the node that was constructed by snapshot and frees 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_perspective

Applies a perspective projection transform.

gtk_snapshot_pop

Removes the top element from the stack of render nodes, and appends it to the node underneath it.

gtk_snapshot_push_blend

Blends together two images with the given blend mode.

gtk_snapshot_push_blur

Blurs an image.

gtk_snapshot_push_clip

Clips an image to a rectangle.

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_debug

Inserts a debug node with a message.

gtk_snapshot_push_fill

Fills the area given by path and fill_rule with an image and discards everything outside of it.

since: 4.14

gtk_snapshot_push_gl_shader

Push a GskGLShaderNode.

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_opacity

Modifies the opacity of an image.

gtk_snapshot_push_repeat

Creates a node that repeats the child node.

gtk_snapshot_push_rounded_clip

Clips an image to a rounded rectangle.

gtk_snapshot_push_shadow

Applies a shadow to an image.

gtk_snapshot_push_stroke

Strokes the given path with the attributes given by stroke and an image.

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 @snapshots 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 snapshots current coordinate system.

gtk_snapshot_rotate_3d

Rotates snapshots coordinate system by angle degrees around axis.

gtk_snapshot_save

Makes a copy of the current state of snapshot and saves it on an internal stack.

gtk_snapshot_scale

Scales snapshots coordinate system in 2-dimensional space by the given factors.

gtk_snapshot_scale_3d

Scales snapshots coordinate system by the given factors.

gtk_snapshot_to_node

Returns the render node that was constructed by snapshot.

gtk_snapshot_to_paintable

Returns a paintable encapsulating the render node that was constructed by snapshot.

gtk_snapshot_transform

Transforms snapshots coordinate system with the given transform.

gtk_snapshot_transform_matrix

Transforms snapshots coordinate system with the given matrix.

gtk_snapshot_translate

Translates snapshots coordinate system by point in 2-dimensional space.

gtk_snapshot_translate_3d

Translates snapshots coordinate system by point.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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.

Class structure

struct GtkSnapshotClass {
  /* no available fields */
}

No description available.