From: johncoswell Date: Thu, 19 Apr 2007 21:40:06 +0000 (+0000) Subject: Improve fill dragging by increasing drag tolerance and preventing already-filled... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eec4c4921c4af4a863a00b7280e4cc9416d1214e;p=inkscape.git Improve fill dragging by increasing drag tolerance and preventing already-filled pixels from being checked in gradient fills --- 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();