Code

Fix paint bucket point queueing issue
authorjohncoswell <johncoswell@users.sourceforge.net>
Wed, 14 Mar 2007 00:10:48 +0000 (00:10 +0000)
committerjohncoswell <johncoswell@users.sourceforge.net>
Wed, 14 Mar 2007 00:10:48 +0000 (00:10 +0000)
src/flood-context.cpp

index aa6eab7b36cb7390b76ac8cd697a73a5f333378f..791da969f4f8540859a59d4a8e34f7b011461415 100644 (file)
@@ -310,9 +310,10 @@ static bool try_add_to_queue(std::queue<NR::Point> *fill_queue, guchar *px, guch
   unsigned char *t = get_pixel(px, x, y, width);
   if (compare_pixels(t, orig, dtc, threshold, method)) {
     unsigned char *trace_t = get_pixel(trace_px, x, y, width);
-    if (trace_t[3] != 255) {
+    if (trace_t[3] != 255 && trace_t[0] != 255) {
       if (fill_switch) {
         fill_queue->push(NR::Point(x, y));
+        trace_t[0] = 255;
       }
     }
     return false;