[cairo-commit] src/cairo-path-in-fill.c

Bertram Felgenhauer inte at kemper.freedesktop.org
Wed Mar 25 21:23:29 PDT 2009


 src/cairo-path-in-fill.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 53107de63a954105f8820e5b96e2a1956cb7af8c
Author: Bertram Felgenhauer <int-e at gmx.de>
Date:   Thu Mar 26 04:56:27 2009 +0100

    [in_fill] Correctly track current point in curve_to.
    
    When discarding a bezier path segment, we still need to update the
    current point.

diff --git a/src/cairo-path-in-fill.c b/src/cairo-path-in-fill.c
index 21cd0bd..d43b1ca 100644
--- a/src/cairo-path-in-fill.c
+++ b/src/cairo-path-in-fill.c
@@ -184,15 +184,19 @@ _cairo_in_fill_curve_to (void *closure,
     if (c->y > bot) bot = c->y;
     if (d->y < top) top = d->y;
     if (d->y > bot) bot = d->y;
-    if (bot < in_fill->y || top > in_fill->y)
+    if (bot < in_fill->y || top > in_fill->y) {
+	in_fill->current_point = *d;
 	return CAIRO_STATUS_SUCCESS;
+    }
 
     left = in_fill->current_point.x;
     if (b->x < left) left = b->x;
     if (c->x < left) left = c->x;
     if (d->x < left) left = d->x;
-    if (left > in_fill->x)
+    if (left > in_fill->x) {
+	in_fill->current_point = *d;
 	return CAIRO_STATUS_SUCCESS;
+    }
 
     /* XXX Investigate direct inspection of the inflections? */
     if (! _cairo_spline_init (&spline,


More information about the cairo-commit mailing list