GNOME Bugzilla – Bug 617568
[cairo] Wrap cairo_copy_path, cairo_copy_path_flat, and cairo_append_path
Last modified: 2010-05-03 20:43:19 UTC
Currently we don't support iterating over the path as the language binding guide suggests; this simply allows one to call .copyPath() and then later call .appendPath() basically.
Created attachment 160222 [details] [review] [cairo] Wrap cairo_copy_path, cairo_copy_path_flat, and cairo_append_path
Review of attachment 160222 [details] [review]: Rest looks good, cheers. ::: modules/cairo-context.c @@ +399,3 @@ + + cr = gjs_cairo_context_get_context(context, obj); + cairo_append_path (cr, path); Extra space before ( @@ +414,3 @@ + cairo_t *cr; + + if (!gjs_parse_args(context, "", "", argc, argv)) Not needed, you can just do a if (argc > 0) { gjs_throw(context, "..."); } @@ +419,3 @@ + cr = gjs_cairo_context_get_context(context, obj); + path = cairo_copy_path (cr); + *retval = OBJECT_TO_JSVAL(gjs_cairo_path_from_path (context, path)); You can remove a bunch of spaces before ( here too. @@ +438,3 @@ + cr = gjs_cairo_context_get_context(context, obj); + path = cairo_copy_path_flat (cr); + *retval = OBJECT_TO_JSVAL(gjs_cairo_path_from_path (context, path)); Ditto, see above.
Attachment 160222 [details] pushed as a39c342 - [cairo] Wrap cairo_copy_path, cairo_copy_path_flat, and cairo_append_path