app: allow more motion events with line art bucket fill.
When a fill zone was a bit too segmented, you'd want to just stroke across it. But it was leaving some pieces uncolored, even though the pointer dragged through it! The exact motion mode allows more events. Note: I don't set it in the similar color filling (where it could have been useful too) mostly because it is harder to remove events then (even if a point was already filled, it could still serve as a seed for more filling if threshold > 0), thus implied too much processing. Anyway in all my tests, it was more a problem for line art filling anyway.
This commit is contained in:
@ -210,6 +210,10 @@ gimp_bucket_fill_tool_constructed (GObject *object)
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
gimp_tool_control_set_motion_mode (tool->control,
|
||||
options->fill_area == GIMP_BUCKET_FILL_LINE_ART ?
|
||||
GIMP_MOTION_MODE_EXACT : GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
line_art = gimp_line_art_new ();
|
||||
g_object_bind_property (options, "fill-transparent",
|
||||
line_art, "select-transparent",
|
||||
@ -811,6 +815,17 @@ gimp_bucket_fill_tool_options_notify (GimpTool *tool,
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->options_notify (tool, options, pspec);
|
||||
|
||||
if (! strcmp (pspec->name, "fill-area"))
|
||||
/* We want more motion events when the tool is used in a paint tool
|
||||
* fashion. Unfortunately we only set exact mode in line art fill,
|
||||
* because we can't as easily remove events from the similar color
|
||||
* mode just because a point has already been selected (unless
|
||||
* threshold were 0, but that's an edge case).
|
||||
*/
|
||||
gimp_tool_control_set_motion_mode (tool->control,
|
||||
bucket_options->fill_area == GIMP_BUCKET_FILL_LINE_ART ?
|
||||
GIMP_MOTION_MODE_EXACT : GIMP_MOTION_MODE_COMPRESS);
|
||||
|
||||
if (! strcmp (pspec->name, "fill-area") ||
|
||||
! strcmp (pspec->name, "sample-merged"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user