GimpUi.cairo_set_source_color
@accepts(cairo.Context, Gegl.Color, Gimp.ColorConfig, bool, Gtk.Widget)
@returns(none)
def cairo_set_source_color(cr, color, config, softproof, widget):
# Python wrapper for gimp_cairo_set_source_color()
Sets color as the source pattern within cr, taking into account the profile of the [class@Gdk.Monitor] which widget is displayed on.
If config is set, the color configuration as set by the user will be used, in particular using any custom monitor profile set in preferences (overriding system-set profile). If no such custom profile is set, it will use the profile of the monitor widget is displayed on and will default to sRGB if widget is None.
Use [func@Gimp.get_color_configuration] to retrieve the user [class@Gimp.ColorConfig].
TODO: softproof is currently unused.
Since 3.0
- cr
Cairo context.
- color
the [class@Gegl.Color] to use as source pattern within cr.
- config
the color management settings.
- softproof
whether the color must also be soft-proofed.
- widget
[class@Gtk.Widget] to draw the focus indicator on.