SymbolicPaintable

Added in version 4.6.

class SymbolicPaintable(*args, **kwargs)

Implementations: IconPaintable

GtkSymbolicPaintable is an interface that support symbolic colors in paintables.

GdkPaintable’s implementing the interface will have the snapshot_symbolic function called and have the colors for drawing symbolic icons passed. At least 4 colors are guaranteed to be passed every time.

These 4 colors are the foreground color, and the colors to use for errors, warnings and success information in that order.

More colors may be added in the future.

Methods

class SymbolicPaintable
snapshot_symbolic(snapshot: Snapshot, width: float, height: float, colors: Sequence[RGBA]) None

Snapshots the paintable with the given colors.

If less than 4 colors are provided, GTK will pad the array with default colors.

Added in version 4.6.

Parameters:
  • snapshot – a GdkSnapshot to snapshot to

  • width – width to snapshot in

  • height – height to snapshot in

  • colors – a pointer to an array of colors

Virtual Methods

class SymbolicPaintable
do_snapshot_symbolic(snapshot: Snapshot, width: float, height: float, colors: Sequence[RGBA]) None

Snapshots the paintable with the given colors.

If less than 4 colors are provided, GTK will pad the array with default colors.

Added in version 4.6.

Parameters:
  • snapshot – a GdkSnapshot to snapshot to

  • width – width to snapshot in

  • height – height to snapshot in

  • colors – a pointer to an array of colors