Add functions to set a tools canvas style colors, enabling Paintbrush presets to have a user colored painting cursor
Operating System:
Description of the feature
I'd like to be able to put attributes on a Paintbrush preset that affects the 'Cario' cursor colors. However there seems to be no way to access a tools bg, fg and highlight color within a function. They are set only once, in gimpcanvas-style.c, and affect all tools.
static const GimpRGB tool_bg = { 1.0, 0.0, 0.0, 0.4 };
static const GimpRGB tool_fg = { 0.0, 0.0, 1.0, 0.8 };
static const GimpRGB tool_fg_highlight = { 1.0, 0.8, 0.2, 0.8 };
- tool_bg, the lines drawn
- tool_fg, the fill color
- tool_fg_highlight, you can set an item that's been drawn to use the highlight color, not tried it yet.
I'd like to override those colors with a per tool preset attribute, via something like;
gimp_set_tool_bg_style (drawTool, GimpRGB color)
gimp_set_tool_fg_style (drawTool, GimpRGB color, boolean highlight)
With the colors taken from new attributes added to the Paintbrush preset.
This is also needed for outline colors, as brushes often use them.
gimp_set_outline_bg_style (drawTool, GimpRGB color)
gimp_set_outline_fg_style (drawTool, GimpRGB color)
With 'get' functions for those canvas colors so that the default colors of a tools preset could be set, inherit from, the global colors.
gimp_canvas_get_tool_bg_style
gimp_canvas_get_tool_fg_style (or fg_highlight)
gimp_canvas_get_outline_bg_style
gimp_canvas_get_outline_fg_style
Use cases
This would allow the creation of a general Paintbrush cursor that is balanced, with softer sizing, and a bolder filled contact circle. Without affecting other tools.
And when painting using an outline brush, an outline pattern that is not so harsh.
The user could then tweak it per preset, only affecting that particular brush preset.
For example;
For inking brushes, when inking onto a light background with an inking preset, the cursor could have dark transparent sizing, and a dark transparent filled contact circle.
For fully pressure sensitive painting brushes, when painting onto a colored surface, white transparent sizing and a white transparent filled contact circle.
For partial, or not pressure sensitive painting brushes. When painting onto a colored surface, with an outline brush, a softly outlined brush shape with white.