[cairo-commit] Branch '1.8' - AUTHORS src/cairo-path-fixed.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 17 08:46:46 PDT 2009


 AUTHORS                |    1 +
 src/cairo-path-fixed.c |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 158ab5cdede04de5071599a962ae9a354c223036
Author: Nis Martensen <nis.martensen at web.de>
Date:   Tue Jun 16 23:27:20 2009 +0200

    [path] Fix missing implicit move-to
    
    When cairo_curve_to happens to start a new subpath (e.g., after a call
    to cairo_new_sub_path()), it also needs to update the last_move_point.
    Otherwise the new current point after a close_path() will be at an
    unexpected position.
    
    Therefore, call _cairo_path_fixed_move_to() explicitly.

diff --git a/AUTHORS b/AUTHORS
index 8c06174..cda5a13 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -50,6 +50,7 @@ Tor Lillqvist <tml at novell.com> win32 build fixes, build scripts
 Jinghua Luo <sunmoon1997 at gmail.com> Add bitmap glyph transformation, many freetype and glitz fixes
 Luke-Jr <luke-jr at utopios.org> Build fix for cross-compiling
 Kjartan Maraas <kmaraas at gnome.org> Several fixes for sparse, lots of debug help for multi-thread bugs
+Nis Martensen <nis.martensen at web.de> Bug fix for sub paths
 Jordi Mas <jordi at ximian.com> Bug fix for cairo_show_text
 Nicholas Miell <nmiell at gmail.com> Fixes for linking bugs on AMD64
 Eugeniy Meshcheryakov <eugen at debian.org> PS/PDF font subsetting improvements
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index a915ada..2f9d47e 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -254,7 +254,7 @@ _cairo_path_fixed_line_to (cairo_path_fixed_t *path,
 
     /* When there is not yet a current point, the line_to operation
      * becomes a move_to instead. Note: We have to do this by
-     * explicitly calling into _cairo_path_fixed_line_to to ensure
+     * explicitly calling into _cairo_path_fixed_move_to to ensure
      * that the last_move_point state is updated properly.
      */
     if (! path->has_current_point)
@@ -300,9 +300,9 @@ _cairo_path_fixed_curve_to (cairo_path_fixed_t	*path,
     point[1].x = x1; point[1].y = y1;
     point[2].x = x2; point[2].y = y2;
 
+    /* make sure subpaths are started properly */
     if (! path->has_current_point) {
-	status = _cairo_path_fixed_add (path, CAIRO_PATH_OP_MOVE_TO,
-					&point[0], 1);
+	status = _cairo_path_fixed_move_to (path, point[0].x, point[0].y);
 	if (status)
 	    return status;
     }


More information about the cairo-commit mailing list