Recording final move_to in copy_path()

Behdad Esfahbod <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Currently if one does cairo_copy_path(), any final move_to in the path is not
copied over.  This is unfortunate since copying the path and applying it later
does not leave the current point the way it was before.

Unless there's any objections, I'm going to push the following patch that
fixes this:

diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index 14913fd..4143307 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -847,6 +847,9 @@ _cairo_path_fixed_interpret (const cairo_path_fixed_t
        }
     } cairo_path_foreach_buf_end (buf, path);

+    if (path->has_current_point)
+       return (*move_to) (closure, &path->current_point);
+
     return CAIRO_STATUS_SUCCESS;
 }


I know I should be adding a test for this, but...

-- 
behdad
http://behdad.org/
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.