Class

GtkPathPaintable

unstable since: 4.22

Description [src]

final class Gtk.PathPaintable : GObject.Object
  implements Gdk.Paintable, Gtk.SymbolicPaintable {
  /* No available fields */
}

A paintable implementation that renders paths, with animations.

GtkPathPaintable objects are created by parsing a subset of SVG. The subset is similar to traditional symbolic icons, with extensions to support state transitions and animations.

A GtkPathPaintable fills or strokes paths with symbolic or fixed colors. It can have multiple states, and paths can be included in a subset of the states. The special ‘empty’ state is always available.

To find out what states a path paintable has, use gtk_path_paintable_get_max_state(). To set the current state, use gtk_path_paintable_set_state().

States can have animation, and the transition between different states can also be animated.

A state transition
An animated state

GtkPathPaintable objects can be created in UI files by setting the GtkPathPaintable:resource property.

Available since: 4.22

Hierarchy

hierarchy this GtkPathPaintable implements_0 GdkPaintable this--implements_0 implements_1 GtkSymbolicPaintable this--implements_1 ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gtk_path_paintable_new_from_bytes

Parses the data in bytes and creates a paintable.

unstable since: 4.22

gtk_path_paintable_new_from_resource

Parses the resource and creates a paintable.

unstable since: 4.22

Instance methods

gtk_path_paintable_get_max_state

Returns the largest value that occurs among the states of the paths in this paintable.

unstable since: 4.22

gtk_path_paintable_get_state

Gets the state of the paintable.

unstable since: 4.22

gtk_path_paintable_get_weight

Gets the value of the weight property.

unstable since: 4.22

gtk_path_paintable_set_state

Sets the state of the paintable.

unstable since: 4.22

gtk_path_paintable_set_weight

Sets the font weight that is used when rendering the paintable.

unstable since: 4.22

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GdkPaintable (9)
gdk_paintable_compute_concrete_size

Compute a concrete size for the GdkPaintable.

gdk_paintable_get_current_image

Gets an immutable paintable for the current contents displayed by paintable.

gdk_paintable_get_flags

Get flags for the paintable.

gdk_paintable_get_intrinsic_aspect_ratio

Gets the preferred aspect ratio the paintable would like to be displayed at.

gdk_paintable_get_intrinsic_height

Gets the preferred height the paintable would like to be displayed at.

gdk_paintable_get_intrinsic_width

Gets the preferred width the paintable would like to be displayed at.

gdk_paintable_invalidate_contents

Called by implementations of GdkPaintable to invalidate their contents.

gdk_paintable_invalidate_size

Called by implementations of GdkPaintable to invalidate their size.

gdk_paintable_snapshot

Snapshots the given paintable with the given width and height.

Methods inherited from GtkSymbolicPaintable (2)
gtk_symbolic_paintable_snapshot_symbolic

Snapshots the paintable with the given colors.

since: 4.6

gtk_symbolic_paintable_snapshot_with_weight

Snapshots the paintable with the given colors and weight.

unstable since: 4.22

Properties

Gtk.PathPaintable:resource

Construct-only property to create a path paintable from a resource in ui files.

unstable since: 4.22

Gtk.PathPaintable:state

The current state of the paintable.

unstable since: 4.22

Gtk.PathPaintable:weight

If not set to -1, this value overrides the font weight used when rendering the paintable.

unstable since: 4.22

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.

Signals inherited from GdkPaintable (2)
GdkPaintable::invalidate-contents

Emitted when the contents of the paintable change.

GdkPaintable::invalidate-size

Emitted when the intrinsic size of the paintable changes.

Class structure

struct GtkPathPaintableClass {
  /* no available fields */
}

No description available.