[gimp] app: allow more motion events with line art bucket fill.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: allow more motion events with line art bucket fill.
- Date: Wed, 23 Jan 2019 16:02:59 +0000 (UTC)
commit 9c13058d548817eb8fa19d152170e88c593c9ef7
Author: Jehan <jehan girinstud io>
Date: Wed Jan 23 16:49:23 2019 +0100
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.
app/tools/gimpbucketfilltool.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c
index 6f62d4da70..f47694db82 100644
--- a/app/tools/gimpbucketfilltool.c
+++ b/app/tools/gimpbucketfilltool.c
@@ -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"))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]