:right-sidebar: True SymbolicPaintable =================================================================== .. currentmodule:: gi.repository.Gtk .. versionadded:: 4.6 .. class:: SymbolicPaintable(*args, **kwargs) :no-contents-entry: Implementations: :class:`~gi.repository.Gtk.IconPaintable`, :class:`~gi.repository.Gtk.Svg` An interface that supports symbolic colors in paintables. ``GdkPaintable``\s implementing the interface will have the :obj:`~gi.repository.Gtk.SymbolicPaintable.snapshot_symbolic` function called and have the colors for drawing symbolic icons passed. At least 5 colors are guaranteed to be passed every time. These 5 colors are the foreground color, and the colors to use for errors, warnings and success information in that order, followed by the system accent color. The system accent color has been added in GTK 4.22. More colors may be added in the future. Methods ------- .. rst-class:: interim-class .. class:: SymbolicPaintable :no-index: .. method:: snapshot_symbolic(snapshot: ~gi.repository.Gdk.Snapshot, width: float, height: float, colors: list[~gi.repository.Gdk.RGBA]) -> None Snapshots the paintable with the given colors. If less than 5 colors are provided, GTK will pad the array with default colors. .. versionadded:: 4.6 :param snapshot: a ``GdkSnapshot`` to snapshot to :param width: width to snapshot in :param height: height to snapshot in :param colors: a pointer to an array of colors .. method:: snapshot_with_weight(snapshot: ~gi.repository.Gdk.Snapshot, width: float, height: float, colors: list[~gi.repository.Gdk.RGBA], weight: float) -> None Snapshots the paintable with the given colors and weight. If less than 5 colors are provided, GTK will pad the array with default colors. .. versionadded:: 4.22 :param snapshot: a ``GdkSnapshot`` to snapshot to :param width: width to snapshot in :param height: height to snapshot in :param colors: a pointer to an array of colors :param weight: The font weight to use (from 1 to 1000, with default 400) Virtual Methods --------------- .. rst-class:: interim-class .. class:: SymbolicPaintable :no-index: .. method:: do_snapshot_symbolic(snapshot: ~gi.repository.Gdk.Snapshot, width: float, height: float, colors: list[~gi.repository.Gdk.RGBA]) -> None Snapshots the paintable with the given colors. If less than 5 colors are provided, GTK will pad the array with default colors. .. versionadded:: 4.6 :param snapshot: a ``GdkSnapshot`` to snapshot to :param width: width to snapshot in :param height: height to snapshot in :param colors: a pointer to an array of colors .. method:: do_snapshot_with_weight(snapshot: ~gi.repository.Gdk.Snapshot, width: float, height: float, colors: list[~gi.repository.Gdk.RGBA], weight: float) -> None Snapshots the paintable with the given colors and weight. If less than 5 colors are provided, GTK will pad the array with default colors. .. versionadded:: 4.22 :param snapshot: a ``GdkSnapshot`` to snapshot to :param width: width to snapshot in :param height: height to snapshot in :param colors: a pointer to an array of colors :param weight: The font weight to use (from 1 to 1000, with default 400)