summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Bintz <me@johnbintz.com>2007-04-19 21:40:06 +0000
committerjohncoswell <johncoswell@users.sourceforge.net>2007-04-19 21:40:06 +0000
commitf03778a508c652f507ccd0df807a2d67a800a2da (patch)
tree20b3ca4a96663cffea842bc05a14a8987f13bbc9 /src
parentImprove readability and remove some unused code (diff)
downloadinkscape-f03778a508c652f507ccd0df807a2d67a800a2da.tar.gz
inkscape-f03778a508c652f507ccd0df807a2d67a800a2da.zip
Improve fill dragging by increasing drag tolerance and preventing already-filled pixels from being checked in gradient fills
(bzr r2931)
Diffstat (limited to 'src')
-rw-r--r--src/flood-context.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 423f60980..a25ab2196 100644
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -125,7 +125,7 @@ static void sp_flood_context_init(SPFloodContext *flood_context)
event_context->hot_y = 30;
event_context->xp = 0;
event_context->yp = 0;
- event_context->tolerance = 0;
+ event_context->tolerance = 4;
event_context->within_tolerance = false;
event_context->item_to_select = NULL;
@@ -667,7 +667,10 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even
merge_pixel_with_background(orig_color, dtc, merged_orig);
- fill_queue.push_front(color_point);
+ unsigned char *trace_t = get_pixel(trace_px, (int)color_point[NR::X], (int)color_point[NR::Y], width);
+ if (trace_t[0] != 255) {
+ fill_queue.push_front(color_point);
+ }
while (!fill_queue.empty() && !aborted) {
NR::Point cp = fill_queue.front();