? vector-layers.diff ? vector-layers2.diff Index: ChangeLog =================================================================== RCS file: /cvs/gnome/gimp/ChangeLog,v retrieving revision 1.12975 retrieving revision 1.12975.2.14 diff -u -p -r1.12975 -r1.12975.2.14 --- ChangeLog 20 Jul 2006 15:20:06 -0000 1.12975 +++ ChangeLog 8 Sep 2006 21:16:01 -0000 1.12975.2.14 @@ -1,3 +1,231 @@ +2006-09-08 Hendrik Boom + + * app/core/gimpstrokedesc.c: added + gimp_stroke_desc_(de)serialize_property functions with the effect that + the GimpPaintInfo property of GimpStrokeDesc is now serialized by name + rather than by value. Images with vector layers can now be saved and + re-loaded without the previously mentionned error message. + +2006-08-20 Hendrik Boom + Note: an error message is shown when loading images with vector layers + produced by recent versions of this code. This is caused by improper + (de)serialization of the currently unused paint-info property of a + GimpVectorLayerOptions' stroke-desc. However, as this is the last thing + to be deserialized, it does not currently interfere with loading. + + * app/vectors/gimpvectorlayer.c + * app/vectors/gimpvectorlayeroptions.c: fixed signal disconnections for + some properties. + + * app/vectors/gimpvectorlayeroptions.c: the vector layer is now + notified when its vectors object is removed from the image. + + * app/vectors/gimpvectorlayer.[ch]: added the gimp_vector_layer_discard + function. This function sets the vector-layer-options property to null, + which causes this layer to act like a regular layer. This is called + either from the GUI or when it is noticed that the associated path has + been removed from the image. + + * app/actions/layers-actions.c + * app/actions/layers-commands.[ch] + * menus/image-menu.xml.in + * menus/layers-menu.xml: changed the name of the layers-fill-stroke to + layers-vector-fill-stroke, and changed the name of the callback + accordingly. Added the layers-vector-discard action and callback to + convert a vector layer into an ordinary layer. + +2006-08-20 Hendrik Boom + + * app/actions/layers-actions.c + * app/actions/layers-commands.[ch]: rearranged a couple of actions, and + added the layers-vector-tool action / callback / menu entries. This new + action acts similarly to the existing one for text layers; It selects + the Path tool as well as the vector associated with the vector layer + + * app/core/gimpstrokedesc.c: fixed a bug in gimp_stroke_desc_new which + would cause the paint_info property of a GimpStrokeDesc to be NULL + when no context was passed to it. + + * app/actions/vectors-actions.c: corrected capitalization in the name + of the vectors-to-vector-layer action. + + * app/vectors/gimpvectorlayer.c: the layer bounds are now re-set every + time the layer is rendered, to prevent the path from falling outside the + layer. + + * app/vectors/gimpvectorlayer.c + * app/vectors/gimpvectorlayeroptions.c: added signal disconnects when + certain parameters are set. + + * app/vectors/gimpvectorlayer.c: vector layers now duplicate properly + with the path being shared between the original and new layers. + + * app/vectors/gimpvectorlayer.c: vector layers whose vector-layer-options + property is NULL are no longer considered to be vector layers by + gimp_drawable_is_vector_layer. + +2006-08-14 Hendrik Boom + + * app/vectors/gimpvectorlayer.[ch] + * app/vectors/gimpvectorlayeroptions.[ch]: vector layer stroke and fill + colors are now initialized from a context which is newly passed in + through gimp_vector_layer_new, instead of being hardcoded to black and + blue. + + * app/actions/vectors-commands.c: changed accordingly. + +2006-08-13 Hendrik Boom + + Saving and loading of vector layers into the gimp's XCF file format is + now working: + + * app/vectors/gimpvectorlayeroptions.[ch]: added a constructor and a + mandatory construct-only "gimp" property for use in the initialization + of the "fill-options" and "stroke_desc" properties, which now have the + GIMP_CONFIG_PARAM_AGGREGATE flags set for proper deserialization. + + * app/vectors/gimpvectorlayer-xcf.c + * app/vectors/gimpvectorlayeroptions-parasite.[ch]: changed accordingly + + * app/vectors/gimpvectorlayer-xcf.c: fixed a missing dereference symbol + +2006-08-12 Hendrik Boom + + * app/vectors/gimpvectorlayer-xcf.c: fixed a typo in a property name. + + * app/vectors/gimpvectorlayeroptions-parasite.c: it now prints some + output on loading which may help debugging. + + * /cvs/gnome/gimp/app/vectors/Attic/gimpvectorlayeroptions.c: fixed a + segfault which would occur if the vectors propery of a + gimpvectorlayeroptions was set to NULL (i.e. at construction). + +2006-08-12 Hendrik Boom + + * app/Makefile.am: fixed the linking error by adding the proper symbols + to gimp_console_2_3_LDFLAGS. + +2006-08-12 Hendrik Boom + + * NOTE: this version still does not link properly! Please see the + previous Changelog entry for details. + + * app/vectors/gimpvectorlayeroptions.[ch]: actually added these files + this time, I forgot to add them in the last commit. + +2006-08-11 Hendrik Boom + + * NOTE: this version does not link properly! I am committing it to my + own branch so that others can help in figuring out how to fix the + problem. Note also that as I have not been able to build it + successfully, it is also untested. If you manage to build it, it may + not behave well at runtime. + + * app/vectors/Makefile.am + * app/vectors/gimpvectorlayeroptions.[ch] + * app/vectors/gimpvectorlayeroptions-parasite.[ch]: added new files + implementing a container object for vector layer settings. This object + is serialized when saving to an XCF file. + + * app/dialogs/vectorlayer-options-dialog.[ch] + * app/vectors/gimpvectorlayer.[ch]: changed accordingly. + + * app/vectors/Makefile.am + * app/vectors/gimpvectorlayer-xcf.[ch]: added new files containing + functions related to saving and loading vector layers to/from XCF files. + + * app/xcf/xcf-load.c + * app/xcf/xcf-save.c: added support for loading and saving vector + layers. NOTE: this is where the linking problems occur. + + * app/Makefile.am: attempted to fix the linking problems by adding + "-u gimp_vector_layer_xcf_load_hack" and + "-u gimp_vector_layer_xcf_save_prepare" to gimp_2_3_LDFLAGS. These + functions are in app/vectors/gimpvectorlayer-xcf.[ch]. + +2006-08-01 Hendrik Boom + + * app/vectors/gimpvectorlayer.c: clean-up, + merged gimp_vector_layer_init_stroke_fill into gimp_vector_layer_new. + +2006-07-31 Hendrik Boom + + * app/vectors/gimpvectorlayer.c: fixed a typo/memory leak related to + releasing stroke_desc during finalization. Removed some unused code in + gimp_vector_layer_refresh. + +2006-07-25 Hendrik Boom + + * app/dialogs/vectorlayer-options-dialog.c + * app/tools/gimpvectortool.c + * app/vectors/gimpvectorlayer.c: moved the gimp_image_flush call from + the vector layer code itself to where it is needed in the vector tool + and in the vector layer dialog, since it should only be called from + GUI code. + +2006-07-25 Hendrik Boom + + * app/vectors/gimpvectorlayer.c: added a gimp_image_flush in the right + place so that vector layer updates are now shown properly. + +2006-07-22 Hendrik Boom + + * app/vectors/Makefile.am + * app/vectors/vectors-types.h + * app/vectors/gimpvectorlayer.[ch]: new files implementing vector layers. + + * app/dialogs/Makefile.am + * app/dialogs/vectorlayer-options-dialog.[ch]: new files implementing + the fill / stroke dialog for vector layers. + + * menus/layers-menu.xml + * app/actions/layers-actions.c + * app/actions/layers-commands.[ch]: added "layers-fill-stroke" menu + item, action, and respective callback for opening the fill / stroke + dialog for vector layers. + + * menus/vectors-menu.xml + * app/actions/vectors-actions.c + * app/actions/vectors-commands.[ch]: added "vectors-to-vector-layer" + menu item, action, and respective callback, which create a new vector + layer from the chosen vectors object. + + * app/core/Makefile.am + * app/core/core-types.h + * app/core/gimpfilloptions.[ch]: new files, implementing GimpFillOptions + as a parent of GimpStrokeOptions, factoring out generic functionality. + + * app/core/gimpstrokeoptions.[ch]: changed accordingly. + + * app/core/gimpdrawable-stroke.[ch]: added gimp_drawable_fill_vectors, + factoring common functionality into the new static function + gimp_drawable_stroke_scan_convert which can either do a stroke or + a fill, depending on its arguments. + + * app/core/gimpitem.[ch]: added a push_undo boolean argument to the + end of gimp_item_stroke, as well as the item's stroke virtual + function. Changed implementations of stroke and the paint functions + used by gimp_item_stroke as necessary. Also changed calls to + gimp_item_stroke accordingly. + + * app/actions/select-commands.c + * app/actions/vectors-commands.c + * app/core/gimpchannel.c + * app/core/gimpdrawable-stroke.[ch] + * app/core/gimpselection.c + * app/dialogs/stroke-dialog.c + * app/paint/gimppaintcore-stroke.[ch] + * app/paint/gimppaintcore.[ch] + * app/tools/gimppainttool.c + * app/vectors/gimpvectors.c + * tools/pdbgen/pdb/edit.pdb + * tools/pdbgen/pdb/paint_tools.pdb + * tools/pdbgen/pdb/paths.pdb: changed accordingly. + + * app/pdb/edit_cmds.c + * app/pdb/paint_tools_cmds.c + * app/pdb/paths_cmds.c: regenerated. + 2006-07-20 Sven Neumann * app/core/gimp-edit.c: formatting. Index: app/Makefile.am =================================================================== RCS file: /cvs/gnome/gimp/app/Makefile.am,v retrieving revision 1.359 retrieving revision 1.359.2.2 diff -u -p -r1.359 -r1.359.2.2 --- app/Makefile.am 27 Apr 2006 09:30:55 -0000 1.359 +++ app/Makefile.am 13 Aug 2006 00:05:36 -0000 1.359.2.2 @@ -90,7 +90,7 @@ INCLUDES = \ $(PANGOFT2_CFLAGS) \ -I$(includedir) -gimp_2_3_LDFLAGS = $(mwindows) $(munix) +gimp_2_3_LDFLAGS = $(mwindows) $(munix) -u gimp_vector_layer_xcf_load_hack -u gimp_vector_layer_xcf_save_prepare gimp_2_3_LDADD = \ gui/libappgui.a \ @@ -138,6 +138,8 @@ gimp_console_2_3_SOURCES = $(app_sources gimp_console_2_3_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DGIMP_CONSOLE_COMPILATION + +gimp_console_2_3_LDFLAGS = -u gimp_vector_layer_xcf_load_hack gimp_console_2_3_LDADD = \ widgets/widgets-enums.o \ Index: app/actions/layers-actions.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/layers-actions.c,v retrieving revision 1.38 retrieving revision 1.38.2.3 diff -u -p -r1.38 -r1.38.2.3 --- app/actions/layers-actions.c 13 May 2006 19:48:17 -0000 1.38 +++ app/actions/layers-actions.c 21 Aug 2006 03:35:49 -0000 1.38.2.3 @@ -31,6 +31,8 @@ #include "text/gimptextlayer.h" +#include "vectors/gimpvectorlayer.h" + #include "widgets/gimphelp-ids.h" #include "widgets/gimpactiongroup.h" @@ -63,6 +65,12 @@ static const GimpActionEntry layers_acti N_("Activate the text tool on this text layer"), G_CALLBACK (layers_text_tool_cmd_callback), GIMP_HELP_TOOL_TEXT }, + + { "layers-vector-tool", GIMP_STOCK_TOOL_PATH, + N_("Path Tool"), NULL, + N_("Activate the path tool on this vector layer's path"), + G_CALLBACK (layers_vector_tool_cmd_callback), + GIMP_HELP_TOOL_PATH }, { "layers-edit-attributes", GTK_STOCK_EDIT, N_("_Edit Layer Attributes..."), NULL, @@ -160,6 +168,18 @@ static const GimpActionEntry layers_acti G_CALLBACK (layers_text_along_vectors_cmd_callback), GIMP_HELP_LAYER_TEXT_ALONG_PATH }, + { "layers-vector-fill-stroke", NULL, + N_("Fill / Stroke"), NULL, + N_("Edit the fill and stroke of this vector layer"), + G_CALLBACK (layers_vector_fill_stroke_cmd_callback), + NULL }, + + { "layers-vector-discard", NULL, + N_("Discard Vector Information"), NULL, + N_("Turn this vector layer into a normal layer"), + G_CALLBACK (layers_vector_discard_cmd_callback), + NULL }, + { "layers-resize", GIMP_STOCK_RESIZE, N_("Layer B_oundary Size..."), NULL, N_("Adjust the layer dimensions"), @@ -456,18 +476,19 @@ void layers_actions_update (GimpActionGroup *group, gpointer data) { - GimpImage *image = action_data_get_image (data); - GimpLayer *layer = NULL; - GimpLayerMask *mask = NULL; /* layer mask */ - gboolean fs = FALSE; /* floating sel */ - gboolean ac = FALSE; /* active channel */ - gboolean sel = FALSE; - gboolean alpha = FALSE; /* alpha channel present */ - gboolean indexed = FALSE; /* is indexed */ - gboolean lock_alpha = FALSE; - gboolean text_layer = FALSE; - GList *next = NULL; - GList *prev = NULL; + GimpImage *image = action_data_get_image (data); + GimpLayer *layer = NULL; + GimpLayerMask *mask = NULL; /* layer mask */ + gboolean fs = FALSE; /* floating sel */ + gboolean ac = FALSE; /* active channel */ + gboolean sel = FALSE; + gboolean alpha = FALSE; /* alpha channel present */ + gboolean indexed = FALSE; /* is indexed */ + gboolean lock_alpha = FALSE; + gboolean text_layer = FALSE; + gboolean vector_layer = FALSE; + GList *next = NULL; + GList *prev = NULL; if (image) { @@ -495,7 +516,10 @@ layers_actions_update (GimpActionGroup * } if (layer) + { text_layer = gimp_drawable_is_text_layer (GIMP_DRAWABLE (layer)); + vector_layer = gimp_drawable_is_vector_layer (GIMP_DRAWABLE (layer)); + } } } @@ -507,6 +531,7 @@ layers_actions_update (GimpActionGroup * gimp_action_group_set_action_active (group, action, (condition) != 0) SET_VISIBLE ("layers-text-tool", text_layer && !ac); + SET_VISIBLE ("layers-vector-tool", vector_layer && !ac); SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac); SET_SENSITIVE ("layers-new", image); @@ -536,6 +561,9 @@ layers_actions_update (GimpActionGroup * SET_VISIBLE ("layers-text-selection-add", text_layer && !ac); SET_VISIBLE ("layers-text-selection-subtract", text_layer && !ac); SET_VISIBLE ("layers-text-selection-intersect", text_layer && !ac); + + SET_VISIBLE ("layers-vector-fill-stroke", vector_layer && !ac); + SET_VISIBLE ("layers-vector-discard", vector_layer && !ac); SET_SENSITIVE ("layers-resize", layer && !ac); SET_SENSITIVE ("layers-resize-to-image", layer && !ac); Index: app/actions/layers-commands.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/layers-commands.c,v retrieving revision 1.160 retrieving revision 1.160.2.3 diff -u -p -r1.160 -r1.160.2.3 --- app/actions/layers-commands.c 19 May 2006 14:50:45 -0000 1.160 +++ app/actions/layers-commands.c 21 Aug 2006 03:35:49 -0000 1.160.2.3 @@ -50,6 +50,8 @@ #include "text/gimptext-vectors.h" #include "text/gimptextlayer.h" +#include "vectors/gimpvectorlayer.h" +#include "vectors/gimpvectorlayeroptions.h" #include "vectors/gimpvectors-warp.h" #include "widgets/gimpaction.h" @@ -61,8 +63,10 @@ #include "display/gimpdisplayshell.h" #include "tools/gimptexttool.h" +#include "tools/gimpvectortool.h" #include "tools/tool_manager.h" +#include "dialogs/vectorlayer-options-dialog.h" #include "dialogs/layer-add-mask-dialog.h" #include "dialogs/layer-options-dialog.h" #include "dialogs/resize-dialog.h" @@ -184,6 +188,45 @@ layers_text_tool_cmd_callback (GtkAction } void +layers_vector_tool_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpImage *image; + GimpLayer *layer; + GtkWidget *widget; + GimpTool *active_tool; + return_if_no_layer (image, layer, data); + return_if_no_widget (widget, data); + + if (! gimp_drawable_is_vector_layer (GIMP_DRAWABLE (layer))) + { + layers_edit_attributes_cmd_callback (action, data); + return; + } + + active_tool = tool_manager_get_active (image->gimp); + + if (! GIMP_IS_VECTOR_TOOL (active_tool)) + { + GimpToolInfo *tool_info; + + tool_info = (GimpToolInfo *) + gimp_container_get_child_by_name (image->gimp->tool_info_list, + "gimp-vector-tool"); + + if (GIMP_IS_TOOL_INFO (tool_info)) + { + gimp_context_set_tool (action_data_get_context (data), tool_info); + active_tool = tool_manager_get_active (image->gimp); + } + } + + if (GIMP_IS_VECTOR_TOOL (active_tool)) + gimp_vector_tool_set_vectors (GIMP_VECTOR_TOOL (active_tool), + GIMP_VECTOR_LAYER (layer)->options->vectors); +} + +void layers_edit_attributes_cmd_callback (GtkAction *action, gpointer data) { @@ -509,6 +552,37 @@ layers_text_along_vectors_cmd_callback ( gimp_image_flush (image); } +} + +void +layers_vector_fill_stroke_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpImage *image; + GimpLayer *layer; + GtkWidget *widget; + GtkWidget *dialog; + return_if_no_layer (image, layer, data); + return_if_no_widget (widget, data); + + dialog = vectorlayer_options_dialog_new (GIMP_ITEM (layer), + _("Fill / Stroke"), + GTK_STOCK_OK, + NULL, + widget); + gtk_widget_show (dialog); +} + +void +layers_vector_discard_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpImage *image; + GimpLayer *layer; + return_if_no_layer (image, layer, data); + + if (GIMP_IS_VECTOR_LAYER (layer)) + gimp_vector_layer_discard (GIMP_VECTOR_LAYER (layer)); } void Index: app/actions/layers-commands.h =================================================================== RCS file: /cvs/gnome/gimp/app/actions/layers-commands.h,v retrieving revision 1.31 retrieving revision 1.31.2.3 diff -u -p -r1.31 -r1.31.2.3 --- app/actions/layers-commands.h 13 May 2006 19:48:17 -0000 1.31 +++ app/actions/layers-commands.h 21 Aug 2006 03:35:49 -0000 1.31.2.3 @@ -22,6 +22,8 @@ void layers_text_tool_cmd_callback (GtkAction *action, gpointer data); +void layers_vector_tool_cmd_callback (GtkAction *action, + gpointer data); void layers_edit_attributes_cmd_callback (GtkAction *action, gpointer data); void layers_new_cmd_callback (GtkAction *action, @@ -55,6 +57,11 @@ void layers_text_discard_cmd_callback void layers_text_to_vectors_cmd_callback (GtkAction *action, gpointer data); void layers_text_along_vectors_cmd_callback (GtkAction *action, + gpointer data); + +void layers_vector_fill_stroke_cmd_callback (GtkAction *action, + gpointer data); +void layers_vector_discard_cmd_callback (GtkAction *action, gpointer data); void layers_resize_cmd_callback (GtkAction *action, Index: app/actions/select-commands.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/select-commands.c,v retrieving revision 1.51 retrieving revision 1.51.2.1 diff -u -p -r1.51 -r1.51.2.1 --- app/actions/select-commands.c 6 Jun 2006 06:39:40 -0000 1.51 +++ app/actions/select-commands.c 22 Jul 2006 20:25:50 -0000 1.51.2.1 @@ -326,7 +326,7 @@ select_stroke_last_vals_cmd_callback (Gt desc = gimp_stroke_desc_new (image->gimp, context); gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)), - drawable, context, desc, FALSE); + drawable, context, desc, FALSE, TRUE); g_object_unref (desc); Index: app/actions/vectors-actions.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/vectors-actions.c,v retrieving revision 1.24 retrieving revision 1.24.2.2 diff -u -p -r1.24 -r1.24.2.2 --- app/actions/vectors-actions.c 10 Apr 2006 08:06:18 -0000 1.24 +++ app/actions/vectors-actions.c 21 Aug 2006 01:08:01 -0000 1.24.2.2 @@ -138,7 +138,12 @@ static const GimpActionEntry vectors_act { "vectors-import", GTK_STOCK_OPEN, N_("I_mport Path..."), "", NULL, G_CALLBACK (vectors_import_cmd_callback), - GIMP_HELP_PATH_IMPORT } + GIMP_HELP_PATH_IMPORT }, + + { "vectors-to-vector-layer", NULL, + N_("Path to Vector Layer"), "", NULL, + G_CALLBACK (vectors_to_vector_layer_cmd_callback), + NULL } }; static const GimpToggleActionEntry vectors_toggle_actions[] = @@ -294,6 +299,8 @@ vectors_actions_update (GimpActionGroup SET_SENSITIVE ("vectors-paste", image); SET_SENSITIVE ("vectors-export", vectors); SET_SENSITIVE ("vectors-import", image); + + SET_SENSITIVE ("vectors-to-vector-layer", vectors); SET_SENSITIVE ("vectors-visible", vectors); SET_SENSITIVE ("vectors-linked", vectors); Index: app/actions/vectors-commands.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/vectors-commands.c,v retrieving revision 1.120 retrieving revision 1.120.2.2 diff -u -p -r1.120 -r1.120.2.2 --- app/actions/vectors-commands.c 5 May 2006 08:29:31 -0000 1.120 +++ app/actions/vectors-commands.c 14 Aug 2006 20:05:57 -0000 1.120.2.2 @@ -36,6 +36,7 @@ #include "core/gimpimage-merge.h" #include "core/gimpimage-undo.h" #include "core/gimpitemundo.h" +#include "core/gimplayer.h" #include "core/gimpparamspecs.h" #include "core/gimpprogress.h" #include "core/gimpstrokedesc.h" @@ -47,6 +48,7 @@ #include "vectors/gimpvectors.h" #include "vectors/gimpvectors-export.h" #include "vectors/gimpvectors-import.h" +#include "vectors/gimpvectorlayer.h" #include "widgets/gimpaction.h" #include "widgets/gimpclipboard.h" @@ -286,6 +288,25 @@ vectors_merge_visible_cmd_callback (GtkA } void +vectors_to_vector_layer_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpImage *image; + GimpVectors *vectors; + GimpVectorLayer *layer; + return_if_no_vectors (image, vectors, data); + + layer = gimp_vector_layer_new (image, + vectors, + gimp_get_user_context (image->gimp)); + gimp_image_add_layer(image, GIMP_LAYER(layer), -1); + gimp_vector_layer_refresh (layer); + + + gimp_image_flush (image); +} + +void vectors_to_selection_cmd_callback (GtkAction *action, gint value, gpointer data) @@ -400,7 +421,7 @@ vectors_stroke_last_vals_cmd_callback (G else desc = gimp_stroke_desc_new (image->gimp, context); - gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE); + gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE, TRUE); g_object_unref (desc); Index: app/actions/vectors-commands.h =================================================================== RCS file: /cvs/gnome/gimp/app/actions/vectors-commands.h,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -p -r1.21 -r1.21.2.1 --- app/actions/vectors-commands.h 19 Sep 2005 21:33:03 -0000 1.21 +++ app/actions/vectors-commands.h 22 Jul 2006 20:25:52 -0000 1.21.2.1 @@ -44,6 +44,8 @@ void vectors_delete_cmd_callback gpointer data); void vectors_merge_visible_cmd_callback (GtkAction *action, gpointer data); +void vectors_to_vector_layer_cmd_callback (GtkAction *action, + gpointer data); void vectors_to_selection_cmd_callback (GtkAction *action, gint value, gpointer data); Index: app/core/Makefile.am =================================================================== RCS file: /cvs/gnome/gimp/app/core/Makefile.am,v retrieving revision 1.121 retrieving revision 1.121.2.1 diff -u -p -r1.121 -r1.121.2.1 --- app/core/Makefile.am 7 Jun 2006 21:29:53 -0000 1.121 +++ app/core/Makefile.am 22 Jul 2006 20:25:55 -0000 1.121.2.1 @@ -112,6 +112,8 @@ libappcore_a_sources = \ gimpdrawable-stroke.h \ gimpdrawable-transform.c \ gimpdrawable-transform.h \ + gimpfilloptions.c \ + gimpfilloptions.h \ gimpgradient.c \ gimpgradient.h \ gimpgradient-load.c \ Index: app/core/core-types.h =================================================================== RCS file: /cvs/gnome/gimp/app/core/core-types.h,v retrieving revision 1.103 retrieving revision 1.103.2.1 diff -u -p -r1.103 -r1.103.2.1 --- app/core/core-types.h 7 Jun 2006 07:30:39 -0000 1.103 +++ app/core/core-types.h 22 Jul 2006 20:25:55 -0000 1.103.2.1 @@ -73,6 +73,7 @@ typedef struct _GimpDocumentList Gimp /* context objects */ typedef struct _GimpContext GimpContext; +typedef struct _GimpFillOptions GimpFillOptions; typedef struct _GimpStrokeOptions GimpStrokeOptions; typedef struct _GimpToolOptions GimpToolOptions; Index: app/core/gimpchannel.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpchannel.c,v retrieving revision 1.198 retrieving revision 1.198.2.1 diff -u -p -r1.198 -r1.198.2.1 --- app/core/gimpchannel.c 5 Jun 2006 20:19:11 -0000 1.198 +++ app/core/gimpchannel.c 22 Jul 2006 20:25:56 -0000 1.198.2.1 @@ -120,7 +120,8 @@ static void gimp_channel_transform GimpProgress *progress); static gboolean gimp_channel_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc); + GimpStrokeDesc *stroke_desc, + gboolean push_undo); static void gimp_channel_invalidate_boundary (GimpDrawable *drawable); static void gimp_channel_get_active_components (const GimpDrawable *drawable, @@ -669,8 +670,8 @@ gimp_channel_transform (GimpItem static gboolean gimp_channel_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc) - + GimpStrokeDesc *stroke_desc, + gboolean push_undo) { GimpChannel *channel = GIMP_CHANNEL (item); const BoundSeg *segs_in; @@ -696,7 +697,8 @@ gimp_channel_stroke (GimpItem *ite gimp_drawable_stroke_boundary (drawable, stroke_desc->stroke_options, segs_in, n_segs_in, - offset_x, offset_y); + offset_x, offset_y, + push_undo); retval = TRUE; break; @@ -709,7 +711,8 @@ gimp_channel_stroke (GimpItem *ite retval = gimp_paint_core_stroke_boundary (core, drawable, stroke_desc->paint_options, segs_in, n_segs_in, - offset_x, offset_y); + offset_x, offset_y, + push_undo); g_object_unref (core); } Index: app/core/gimpdrawable-stroke.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-stroke.c,v retrieving revision 1.34 retrieving revision 1.34.2.1 diff -u -p -r1.34 -r1.34.2.1 --- app/core/gimpdrawable-stroke.c 28 Mar 2006 17:08:20 -0000 1.34 +++ app/core/gimpdrawable-stroke.c 22 Jul 2006 20:25:57 -0000 1.34.2.1 @@ -51,10 +51,17 @@ /* local function prototypes */ - -static void gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, - GimpStrokeOptions *options, - GimpScanConvert *scan_convert); +static void gimp_drawable_render_vectors (GimpDrawable *drawable, + GimpFillOptions *options, + GimpVectors *vectors, + gboolean do_stroke, + gboolean push_undo); + +static void gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, + GimpFillOptions *options, + GimpScanConvert *scan_convert, + gboolean do_stroke, + gboolean push_undo); /* public functions */ @@ -65,7 +72,8 @@ gimp_drawable_stroke_boundary (GimpDrawa const BoundSeg *bound_segs, gint n_bound_segs, gint offset_x, - gint offset_y) + gint offset_y, + gboolean push_undo) { GimpScanConvert *scan_convert; BoundSeg *stroke_segs; @@ -134,24 +142,64 @@ gimp_drawable_stroke_boundary (GimpDrawa g_free (points); g_free (stroke_segs); - gimp_drawable_stroke_scan_convert (drawable, options, scan_convert); + gimp_drawable_stroke_scan_convert (drawable, GIMP_FILL_OPTIONS(options), scan_convert, TRUE, push_undo); gimp_scan_convert_free (scan_convert); } + + +void +gimp_drawable_fill_vectors (GimpDrawable *drawable, + GimpFillOptions *options, + GimpVectors *vectors, + gboolean push_undo) +{ + g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); + g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); + g_return_if_fail (GIMP_IS_FILL_OPTIONS (options)); + g_return_if_fail (GIMP_IS_VECTORS (vectors)); + g_return_if_fail (options->style != GIMP_STROKE_STYLE_PATTERN || gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL); + + gimp_drawable_render_vectors (drawable, + options, + vectors, + FALSE, + push_undo); +} + void gimp_drawable_stroke_vectors (GimpDrawable *drawable, GimpStrokeOptions *options, - GimpVectors *vectors) + GimpVectors *vectors, + gboolean push_undo) { - GimpScanConvert *scan_convert; - GimpStroke *stroke; - gint num_coords = 0; - g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); g_return_if_fail (GIMP_IS_STROKE_OPTIONS (options)); g_return_if_fail (GIMP_IS_VECTORS (vectors)); + g_return_if_fail (GIMP_FILL_OPTIONS (options)->style != GIMP_STROKE_STYLE_PATTERN || gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL); + + gimp_drawable_render_vectors (drawable, + GIMP_FILL_OPTIONS(options), + vectors, + TRUE, + push_undo); +} + + +/* private functions */ + +static void +gimp_drawable_render_vectors (GimpDrawable *drawable, + GimpFillOptions *options, + GimpVectors *vectors, + gboolean do_stroke, + gboolean push_undo) +{ + GimpScanConvert *scan_convert; + GimpStroke *stroke; + gint num_coords = 0; scan_convert = gimp_scan_convert_new (); @@ -184,7 +232,7 @@ gimp_drawable_stroke_vectors (GimpDrawab } gimp_scan_convert_add_polyline (scan_convert, coords->len, - points, closed); + points, closed || !do_stroke); g_free (points); } @@ -194,29 +242,27 @@ gimp_drawable_stroke_vectors (GimpDrawab } if (num_coords > 0) - gimp_drawable_stroke_scan_convert (drawable, options, scan_convert); + gimp_drawable_stroke_scan_convert (drawable, GIMP_FILL_OPTIONS(options), scan_convert, do_stroke, push_undo); gimp_scan_convert_free (scan_convert); } - -/* private functions */ - static void -gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, - GimpStrokeOptions *options, - GimpScanConvert *scan_convert) +gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, + GimpFillOptions *options, + GimpScanConvert *scan_convert, + gboolean do_stroke, + gboolean push_undo) { - GimpContext *context = GIMP_CONTEXT (options); - GimpImage *image; - gdouble width; - TileManager *base; - TileManager *mask; - gint x, y, w, h; - gint bytes; - gint off_x, off_y; - guchar bg[1] = { 0, }; - PixelRegion maskPR, basePR; + GimpContext *context = GIMP_CONTEXT (options); + GimpImage *image; + TileManager *base; + TileManager *mask; + gint x, y, w, h; + gint bytes; + gint off_x, off_y; + guchar bg[1] = { 0, }; + PixelRegion maskPR, basePR; image = gimp_item_get_image (GIMP_ITEM (drawable)); @@ -238,24 +284,29 @@ gimp_drawable_stroke_scan_convert (GimpD gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); - width = options->width; - - if (options->unit != GIMP_UNIT_PIXEL) + if (do_stroke) { - gimp_scan_convert_set_pixel_ratio (scan_convert, - image->yresolution / - image->xresolution); + GimpStrokeOptions *stroke_options = GIMP_STROKE_OPTIONS(options); + + gdouble width = stroke_options->width; - width *= (image->yresolution / - _gimp_unit_get_factor (image->gimp, options->unit)); - } + if (stroke_options->unit != GIMP_UNIT_PIXEL) + { + gimp_scan_convert_set_pixel_ratio (scan_convert, + image->yresolution / + image->xresolution); - gimp_scan_convert_stroke (scan_convert, width, - options->join_style, - options->cap_style, - options->miter_limit, - options->dash_offset, - options->dash_info); + width *= (image->yresolution / + _gimp_unit_get_factor (image->gimp, stroke_options->unit)); + } + + gimp_scan_convert_stroke (scan_convert, width, + stroke_options->join_style, + stroke_options->cap_style, + stroke_options->miter_limit, + stroke_options->dash_offset, + stroke_options->dash_info); + } /* fill a 1-bpp Tilemanager with black, this will describe the shape * of the stroke. @@ -267,7 +318,7 @@ gimp_drawable_stroke_scan_convert (GimpD /* render the stroke into it */ gimp_scan_convert_render (scan_convert, mask, x + off_x, y + off_y, - options->antialias); + GIMP_FILL_OPTIONS(options)->antialias); bytes = gimp_drawable_bytes_with_alpha (drawable); @@ -275,7 +326,7 @@ gimp_drawable_stroke_scan_convert (GimpD pixel_region_init (&basePR, base, 0, 0, w, h, TRUE); pixel_region_init (&maskPR, mask, 0, 0, w, h, FALSE); - switch (options->style) + switch (GIMP_FILL_OPTIONS(options)->style) { case GIMP_STROKE_STYLE_SOLID: { @@ -316,7 +367,7 @@ gimp_drawable_stroke_scan_convert (GimpD /* Apply to drawable */ pixel_region_init (&basePR, base, 0, 0, w, h, FALSE); gimp_drawable_apply_region (drawable, &basePR, - TRUE, _("Render Stroke"), + push_undo, _("Render Stroke"), gimp_context_get_opacity (context), gimp_context_get_paint_mode (context), NULL, x, y); Index: app/core/gimpdrawable-stroke.h =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-stroke.h,v retrieving revision 1.5 retrieving revision 1.5.6.1 diff -u -p -r1.5 -r1.5.6.1 --- app/core/gimpdrawable-stroke.h 30 Sep 2003 15:16:50 -0000 1.5 +++ app/core/gimpdrawable-stroke.h 22 Jul 2006 20:25:57 -0000 1.5.6.1 @@ -28,11 +28,18 @@ void gimp_drawable_stroke_boundary (Gi const BoundSeg *bound_segs, gint n_bound_segs, gint offset_x, - gint offset_y); + gint offset_y, + gboolean push_undo); + +void gimp_drawable_fill_vectors (GimpDrawable *drawable, + GimpFillOptions *options, + GimpVectors *vectors, + gboolean push_undo); void gimp_drawable_stroke_vectors (GimpDrawable *drawable, GimpStrokeOptions *options, - GimpVectors *vectors); + GimpVectors *vectors, + gboolean push_undo); #endif /* __GIMP_DRAWABLE_STROKE_H__ */ Index: app/core/gimpitem.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpitem.c,v retrieving revision 1.85 retrieving revision 1.85.2.1 diff -u -p -r1.85 -r1.85.2.1 --- app/core/gimpitem.c 21 May 2006 11:32:40 -0000 1.85 +++ app/core/gimpitem.c 22 Jul 2006 20:25:57 -0000 1.85.2.1 @@ -1041,7 +1041,8 @@ gimp_item_stroke (GimpItem *item, GimpDrawable *drawable, GimpContext *context, GimpStrokeDesc *stroke_desc, - gboolean use_default_values) + gboolean use_default_values, + gboolean push_undo) { GimpItemClass *item_class; gboolean retval = FALSE; @@ -1060,13 +1061,15 @@ gimp_item_stroke (GimpItem *item, GimpImage *image = gimp_item_get_image (item); gimp_stroke_desc_prepare (stroke_desc, context, use_default_values); - - gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT, - item_class->stroke_desc); - - retval = item_class->stroke (item, drawable, stroke_desc); - - gimp_image_undo_group_end (image); + + if (push_undo) + gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT, + item_class->stroke_desc); + + retval = item_class->stroke (item, drawable, stroke_desc, push_undo); + + if (push_undo) + gimp_image_undo_group_end (image); gimp_stroke_desc_finish (stroke_desc); } Index: app/core/gimpitem.h =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpitem.h,v retrieving revision 1.47 retrieving revision 1.47.2.1 diff -u -p -r1.47 -r1.47.2.1 --- app/core/gimpitem.h 21 May 2006 11:32:40 -0000 1.47 +++ app/core/gimpitem.h 22 Jul 2006 20:25:57 -0000 1.47.2.1 @@ -112,7 +112,8 @@ struct _GimpItemClass GimpProgress *progress); gboolean (* stroke) (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc); + GimpStrokeDesc *stroke_desc, + gboolean push_undo); const gchar *default_name; const gchar *rename_desc; @@ -219,7 +220,8 @@ gboolean gimp_item_stroke GimpDrawable *drawable, GimpContext *context, GimpStrokeDesc *stroke_desc, - gboolean use_default_values); + gboolean use_default_values, + gboolean push_undo); gint gimp_item_get_ID (GimpItem *item); GimpItem * gimp_item_get_by_ID (Gimp *gimp, Index: app/core/gimpselection.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpselection.c,v retrieving revision 1.42 retrieving revision 1.42.2.1 diff -u -p -r1.42 -r1.42.2.1 --- app/core/gimpselection.c 5 Jun 2006 20:19:11 -0000 1.42 +++ app/core/gimpselection.c 22 Jul 2006 20:25:57 -0000 1.42.2.1 @@ -73,7 +73,8 @@ static void gimp_selection_rotate gboolean clip_result); static gboolean gimp_selection_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc); + GimpStrokeDesc *stroke_desc, + gboolean push_undo); static void gimp_selection_invalidate_boundary (GimpDrawable *drawable); @@ -254,7 +255,8 @@ gimp_selection_rotate (GimpItem static gboolean gimp_selection_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc) + GimpStrokeDesc *stroke_desc, + gboolean push_undo) { GimpSelection *selection = GIMP_SELECTION (item); const BoundSeg *dummy_in; @@ -274,7 +276,7 @@ gimp_selection_stroke (GimpItem *i selection->stroking = TRUE; - retval = GIMP_ITEM_CLASS (parent_class)->stroke (item, drawable, stroke_desc); + retval = GIMP_ITEM_CLASS (parent_class)->stroke (item, drawable, stroke_desc, push_undo); selection->stroking = FALSE; Index: app/core/gimpstrokedesc.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpstrokedesc.c,v retrieving revision 1.11 retrieving revision 1.11.2.2 diff -u -p -r1.11 -r1.11.2.2 --- app/core/gimpstrokedesc.c 28 Jun 2006 06:27:15 -0000 1.11 +++ app/core/gimpstrokedesc.c 8 Sep 2006 21:16:04 -0000 1.11.2.2 @@ -54,18 +54,29 @@ enum static void gimp_stroke_desc_config_iface_init (gpointer iface, gpointer iface_data); -static GObject * gimp_stroke_desc_constructor (GType type, - guint n_params, - GObjectConstructParam *params); -static void gimp_stroke_desc_finalize (GObject *object); -static void gimp_stroke_desc_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec); -static void gimp_stroke_desc_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec); +static GObject * gimp_stroke_desc_constructor (GType type, + guint n_params, + GObjectConstructParam *params); +static void gimp_stroke_desc_finalize (GObject *object); +static void gimp_stroke_desc_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); +static void gimp_stroke_desc_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +static gboolean gimp_stroke_desc_serialize_property (GimpConfig *config, + guint property_id, + const GValue *value, + GParamSpec *pspec, + GimpConfigWriter *writer); +static gboolean gimp_stroke_desc_deserialize_property (GimpConfig *object, + guint property_id, + GValue *value, + GParamSpec *pspec, + GScanner *scanner, + GTokenType *expected); static GimpConfig * gimp_stroke_desc_duplicate (GimpConfig *config); @@ -121,7 +132,9 @@ gimp_stroke_desc_config_iface_init (gpoi { GimpConfigInterface *config_iface = (GimpConfigInterface *) iface; - config_iface->duplicate = gimp_stroke_desc_duplicate; + config_iface->duplicate = gimp_stroke_desc_duplicate; + config_iface->serialize_property = gimp_stroke_desc_serialize_property; + config_iface->deserialize_property = gimp_stroke_desc_deserialize_property; } static void @@ -272,6 +285,89 @@ gimp_stroke_desc_duplicate (GimpConfig * return GIMP_CONFIG (new_desc); } +static gboolean +gimp_stroke_desc_serialize_property (GimpConfig *config, + guint property_id, + const GValue *value, + GParamSpec *pspec, + GimpConfigWriter *writer) +{ + GimpObject *serialize_obj; + + if (property_id == PROP_PAINT_INFO) + serialize_obj = g_value_get_object (value); + else + return FALSE; + + gimp_config_writer_open (writer, pspec->name); + + if (serialize_obj) + gimp_config_writer_string (writer, gimp_object_get_name (serialize_obj)); + else + gimp_config_writer_print (writer, "NULL", 4); + + gimp_config_writer_close (writer); + + return TRUE; +} + +static gboolean +gimp_stroke_desc_deserialize_property (GimpConfig *object, + guint property_id, + GValue *value, + GParamSpec *pspec, + GScanner *scanner, + GTokenType *expected) +{ + GimpStrokeDesc *stroke_desc = GIMP_STROKE_DESC (object); + GimpContainer *container; + GimpObject *current; + gboolean no_data = FALSE; + gchar *object_name; + + if (property_id == PROP_PAINT_INFO) + { + container = stroke_desc->gimp->paint_info_list; + current = (GimpObject *) (GIMP_CONTEXT (stroke_desc->stroke_options)->paint_info); + no_data = TRUE; + } + else + return FALSE; + + if (! no_data) + no_data = stroke_desc->gimp->no_data; + + if (gimp_scanner_parse_identifier (scanner, "NULL")) + { + g_value_set_object (value, NULL); + } + else if (gimp_scanner_parse_string (scanner, &object_name)) + { + GimpObject *deserialize_obj; + + if (! object_name) + object_name = g_strdup (""); + + deserialize_obj = gimp_container_get_child_by_name (container, + object_name); + + if (! deserialize_obj && ! no_data) + { + deserialize_obj = current; + } + + g_value_set_object (value, deserialize_obj); + + g_free (object_name); + } + else + { + *expected = G_TOKEN_STRING; + } + + return TRUE; +} + /* public functions */ @@ -286,13 +382,11 @@ gimp_stroke_desc_new (Gimp *gimp, g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL); if (context) - { paint_info = gimp_context_get_paint_info (context); - - if (! paint_info) - paint_info = gimp_paint_info_get_standard (gimp); - } - + + if (! paint_info) + paint_info = gimp_paint_info_get_standard (gimp); + desc = g_object_new (GIMP_TYPE_STROKE_DESC, "gimp", gimp, "paint-info", paint_info, Index: app/core/gimpstrokeoptions.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpstrokeoptions.c,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -u -p -r1.22 -r1.22.2.1 --- app/core/gimpstrokeoptions.c 15 May 2006 09:46:15 -0000 1.22 +++ app/core/gimpstrokeoptions.c 22 Jul 2006 20:25:57 -0000 1.22.2.1 @@ -67,7 +67,7 @@ static void gimp_stroke_options_get_pr GParamSpec *pspec); -G_DEFINE_TYPE (GimpStrokeOptions, gimp_stroke_options, GIMP_TYPE_CONTEXT) +G_DEFINE_TYPE (GimpStrokeOptions, gimp_stroke_options, GIMP_TYPE_FILL_OPTIONS) static guint stroke_options_signals[LAST_SIGNAL] = { 0 }; @@ -93,11 +93,6 @@ gimp_stroke_options_class_init (GimpStro G_TYPE_NONE, 1, GIMP_TYPE_DASH_PRESET); - GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_STYLE, - "style", NULL, - GIMP_TYPE_STROKE_STYLE, - GIMP_STROKE_STYLE_SOLID, - GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_WIDTH, "width", NULL, 0.0, 2000.0, 6.0, @@ -122,10 +117,6 @@ gimp_stroke_options_class_init (GimpStro "line-width from the actual join point."), 0.0, 100.0, 10.0, GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS, - "antialias", NULL, - TRUE, - GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_DASH_OFFSET, "dash-offset", NULL, 0.0, 2000.0, 0.0, @@ -156,9 +147,6 @@ gimp_stroke_options_set_property (GObjec switch (property_id) { - case PROP_STYLE: - options->style = g_value_get_enum (value); - break; case PROP_WIDTH: options->width = g_value_get_double (value); break; @@ -174,9 +162,6 @@ gimp_stroke_options_set_property (GObjec case PROP_MITER_LIMIT: options->miter_limit = g_value_get_double (value); break; - case PROP_ANTIALIAS: - options->antialias = g_value_get_boolean (value); - break; case PROP_DASH_OFFSET: options->dash_offset = g_value_get_double (value); break; @@ -202,9 +187,6 @@ gimp_stroke_options_get_property (GObjec switch (property_id) { - case PROP_STYLE: - g_value_set_enum (value, options->style); - break; case PROP_WIDTH: g_value_set_double (value, options->width); break; @@ -219,9 +201,6 @@ gimp_stroke_options_get_property (GObjec break; case PROP_MITER_LIMIT: g_value_set_double (value, options->miter_limit); - break; - case PROP_ANTIALIAS: - g_value_set_boolean (value, options->antialias); break; case PROP_DASH_OFFSET: g_value_set_double (value, options->dash_offset); Index: app/core/gimpstrokeoptions.h =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpstrokeoptions.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -p -r1.9 -r1.9.2.1 --- app/core/gimpstrokeoptions.h 19 May 2005 15:17:30 -0000 1.9 +++ app/core/gimpstrokeoptions.h 22 Jul 2006 20:25:57 -0000 1.9.2.1 @@ -23,7 +23,7 @@ #define __GIMP_STROKE_OPTIONS_H__ -#include "gimpcontext.h" +#include "gimpfilloptions.h" #define GIMP_TYPE_STROKE_OPTIONS (gimp_stroke_options_get_type ()) @@ -38,9 +38,7 @@ typedef struct _GimpStrokeOptionsClass G struct _GimpStrokeOptions { - GimpContext parent_instance; - - GimpStrokeStyle style; + GimpFillOptions parent_instance; gdouble width; GimpUnit unit; @@ -50,15 +48,13 @@ struct _GimpStrokeOptions gdouble miter_limit; - gboolean antialias; - gdouble dash_offset; GArray *dash_info; }; struct _GimpStrokeOptionsClass { - GimpContextClass parent_class; + GimpFillOptionsClass parent_class; void (* dash_info_changed) (GimpStrokeOptions *stroke_options, GimpDashPreset preset); Index: app/dialogs/Makefile.am =================================================================== RCS file: /cvs/gnome/gimp/app/dialogs/Makefile.am,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -u -p -r1.22 -r1.22.2.1 --- app/dialogs/Makefile.am 31 Mar 2006 13:36:33 -0000 1.22 +++ app/dialogs/Makefile.am 22 Jul 2006 20:25:58 -0000 1.22.2.1 @@ -80,6 +80,8 @@ libappdialogs_a_sources = \ tips-parser.h \ user-install-dialog.c \ user-install-dialog.h \ + vectorlayer-options-dialog.c \ + vectorlayer-options-dialog.h \ vectors-export-dialog.c \ vectors-export-dialog.h \ vectors-import-dialog.c \ Index: app/dialogs/stroke-dialog.c =================================================================== RCS file: /cvs/gnome/gimp/app/dialogs/stroke-dialog.c,v retrieving revision 1.36 retrieving revision 1.36.2.1 diff -u -p -r1.36 -r1.36.2.1 --- app/dialogs/stroke-dialog.c 5 Jul 2006 13:40:46 -0000 1.36 +++ app/dialogs/stroke-dialog.c 22 Jul 2006 20:25:58 -0000 1.36.2.1 @@ -294,7 +294,7 @@ stroke_dialog_response (GtkWidget *widg saved_desc, (GDestroyNotify) g_object_unref); - gimp_item_stroke (item, drawable, context, desc, FALSE); + gimp_item_stroke (item, drawable, context, desc, FALSE, TRUE); gimp_image_flush (image); } /* fallthrough */ Index: app/paint/gimppaintcore-stroke.c =================================================================== RCS file: /cvs/gnome/gimp/app/paint/gimppaintcore-stroke.c,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -u -p -r1.30 -r1.30.2.1 --- app/paint/gimppaintcore-stroke.c 12 Apr 2006 12:49:23 -0000 1.30 +++ app/paint/gimppaintcore-stroke.c 22 Jul 2006 20:25:59 -0000 1.30.2.1 @@ -42,7 +42,8 @@ gimp_paint_core_stroke (GimpPaintCore GimpDrawable *drawable, GimpPaintOptions *paint_options, GimpCoords *strokes, - gint n_strokes) + gint n_strokes, + gboolean push_undo) { g_return_val_if_fail (GIMP_IS_PAINT_CORE (core), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); @@ -74,7 +75,7 @@ gimp_paint_core_stroke (GimpPaintCore gimp_paint_core_paint (core, drawable, paint_options, GIMP_PAINT_STATE_FINISH, 0); - gimp_paint_core_finish (core, drawable); + gimp_paint_core_finish (core, drawable, push_undo); gimp_paint_core_cleanup (core); @@ -91,7 +92,8 @@ gimp_paint_core_stroke_boundary (GimpPai const BoundSeg *bound_segs, gint n_bound_segs, gint offset_x, - gint offset_y) + gint offset_y, + gboolean push_undo) { GimpImage *image; BoundSeg *stroke_segs; @@ -194,7 +196,7 @@ gimp_paint_core_stroke_boundary (GimpPai if (initialized) { - gimp_paint_core_finish (core, drawable); + gimp_paint_core_finish (core, drawable, push_undo); gimp_paint_core_cleanup (core); } @@ -209,7 +211,8 @@ gboolean gimp_paint_core_stroke_vectors (GimpPaintCore *core, GimpDrawable *drawable, GimpPaintOptions *paint_options, - GimpVectors *vectors) + GimpVectors *vectors, + gboolean push_undo) { GList *stroke; GArray *coords = NULL; @@ -278,7 +281,7 @@ gimp_paint_core_stroke_vectors (GimpPain if (initialized) { - gimp_paint_core_finish (core, drawable); + gimp_paint_core_finish (core, drawable, push_undo); gimp_paint_core_cleanup (core); } Index: app/paint/gimppaintcore-stroke.h =================================================================== RCS file: /cvs/gnome/gimp/app/paint/gimppaintcore-stroke.h,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -u -p -r1.4 -r1.4.6.1 --- app/paint/gimppaintcore-stroke.h 30 Aug 2003 13:22:20 -0000 1.4 +++ app/paint/gimppaintcore-stroke.h 22 Jul 2006 20:25:59 -0000 1.4.6.1 @@ -24,18 +24,21 @@ gboolean gimp_paint_core_stroke GimpDrawable *drawable, GimpPaintOptions *paint_options, GimpCoords *strokes, - gint n_strokes); + gint n_strokes, + gboolean push_undo); gboolean gimp_paint_core_stroke_boundary (GimpPaintCore *core, GimpDrawable *drawable, GimpPaintOptions *paint_options, const BoundSeg *bound_segs, gint n_bound_segs, gint offset_x, - gint offset_y); + gint offset_y, + gboolean push_undo); gboolean gimp_paint_core_stroke_vectors (GimpPaintCore *core, GimpDrawable *drawable, GimpPaintOptions *paint_options, - GimpVectors *vectors); + GimpVectors *vectors, + gboolean push_undo); #endif /* __GIMP_PAINT_CORE_STROKE_H__ */ Index: app/paint/gimppaintcore.c =================================================================== RCS file: /cvs/gnome/gimp/app/paint/gimppaintcore.c,v retrieving revision 1.128 retrieving revision 1.128.2.1 diff -u -p -r1.128 -r1.128.2.1 --- app/paint/gimppaintcore.c 15 May 2006 09:46:17 -0000 1.128 +++ app/paint/gimppaintcore.c 22 Jul 2006 20:25:59 -0000 1.128.2.1 @@ -310,7 +310,8 @@ gimp_paint_core_start (GimpPaintCore void gimp_paint_core_finish (GimpPaintCore *core, - GimpDrawable *drawable) + GimpDrawable *drawable, + gboolean push_undo) { GimpPaintInfo *paint_info; GimpImage *image; @@ -330,22 +331,25 @@ gimp_paint_core_finish (GimpPaintCore *c paint_info = (GimpPaintInfo *) gimp_container_get_child_by_name (image->gimp->paint_info_list, g_type_name (G_TYPE_FROM_INSTANCE (core))); - - gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT, - paint_info ? paint_info->blurb : _("Paint")); - - GIMP_PAINT_CORE_GET_CLASS (core)->push_undo (core, image, NULL); - - gimp_drawable_push_undo (drawable, NULL, - core->x1, core->y1, - core->x2, core->y2, - core->undo_tiles, - TRUE); - + + if (push_undo) + { + gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT, + paint_info ? paint_info->blurb : _("Paint")); + + GIMP_PAINT_CORE_GET_CLASS (core)->push_undo (core, image, NULL); + + gimp_drawable_push_undo (drawable, NULL, + core->x1, core->y1, + core->x2, core->y2, + core->undo_tiles, + TRUE); + + gimp_image_undo_group_end (image); + } + tile_manager_unref (core->undo_tiles); core->undo_tiles = NULL; - - gimp_image_undo_group_end (image); if (core->saved_proj_tiles) { Index: app/paint/gimppaintcore.h =================================================================== RCS file: /cvs/gnome/gimp/app/paint/gimppaintcore.h,v retrieving revision 1.51 retrieving revision 1.51.2.1 diff -u -p -r1.51 -r1.51.2.1 --- app/paint/gimppaintcore.h 12 Apr 2006 12:49:23 -0000 1.51 +++ app/paint/gimppaintcore.h 22 Jul 2006 20:26:00 -0000 1.51.2.1 @@ -118,7 +118,8 @@ gboolean gimp_paint_core_start GimpPaintOptions *paint_options, GimpCoords *coords); void gimp_paint_core_finish (GimpPaintCore *core, - GimpDrawable *drawable); + GimpDrawable *drawable, + gboolean push_undo); void gimp_paint_core_cancel (GimpPaintCore *core, GimpDrawable *drawable); void gimp_paint_core_cleanup (GimpPaintCore *core); Index: app/pdb/edit_cmds.c =================================================================== RCS file: /cvs/gnome/gimp/app/pdb/edit_cmds.c,v retrieving revision 1.83 retrieving revision 1.83.2.1 diff -u -p -r1.83 -r1.83.2.1 --- app/pdb/edit_cmds.c 14 Jun 2006 08:31:58 -0000 1.83 +++ app/pdb/edit_cmds.c 22 Jul 2006 20:26:06 -0000 1.83.2.1 @@ -618,7 +618,7 @@ edit_stroke_invoker (GimpProcedure * g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL); success = gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)), - drawable, context, desc, TRUE); + drawable, context, desc, TRUE, TRUE); g_object_unref (desc); } Index: app/pdb/paint_tools_cmds.c =================================================================== RCS file: /cvs/gnome/gimp/app/pdb/paint_tools_cmds.c,v retrieving revision 1.69 retrieving revision 1.69.2.1 diff -u -p -r1.69 -r1.69.2.1 --- app/pdb/paint_tools_cmds.c 14 Jun 2006 08:31:59 -0000 1.69 +++ app/pdb/paint_tools_cmds.c 22 Jul 2006 20:26:06 -0000 1.69.2.1 @@ -82,7 +82,7 @@ paint_tools_stroke (Gimp *gi } retval = gimp_paint_core_stroke (core, drawable, options, - coords, n_strokes); + coords, n_strokes, TRUE); g_free (coords); Index: app/pdb/paths_cmds.c =================================================================== RCS file: /cvs/gnome/gimp/app/pdb/paths_cmds.c,v retrieving revision 1.82 retrieving revision 1.82.2.1 diff -u -p -r1.82 -r1.82.2.1 --- app/pdb/paths_cmds.c 19 May 2006 12:58:27 -0000 1.82 +++ app/pdb/paths_cmds.c 22 Jul 2006 20:26:06 -0000 1.82.2.1 @@ -321,7 +321,7 @@ path_stroke_current_invoker (GimpProcedu g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL); success = gimp_item_stroke (GIMP_ITEM (vectors), - drawable, context, desc, TRUE); + drawable, context, desc, TRUE, TRUE); g_object_unref (desc); } Index: app/tools/gimpbrushtool.c =================================================================== RCS file: /cvs/gnome/gimp/app/tools/gimpbrushtool.c,v retrieving revision 1.142 retrieving revision 1.142.2.1 diff -u -p -r1.142 -r1.142.2.1 --- app/tools/gimpbrushtool.c 28 May 2006 14:13:44 -0000 1.142 +++ app/tools/gimpbrushtool.c 22 Jul 2006 20:26:09 -0000 1.142.2.1 @@ -458,7 +458,7 @@ gimp_paint_tool_button_release (GimpTool if (state & GDK_BUTTON3_MASK) gimp_paint_core_cancel (core, drawable); else - gimp_paint_core_finish (core, drawable); + gimp_paint_core_finish (core, drawable, TRUE); gimp_image_flush (display->image); Index: app/tools/gimppainttool.c =================================================================== RCS file: /cvs/gnome/gimp/app/tools/gimppainttool.c,v retrieving revision 1.142 retrieving revision 1.142.2.1 diff -u -p -r1.142 -r1.142.2.1 --- app/tools/gimppainttool.c 28 May 2006 14:13:44 -0000 1.142 +++ app/tools/gimppainttool.c 22 Jul 2006 20:26:09 -0000 1.142.2.1 @@ -458,7 +458,7 @@ gimp_paint_tool_button_release (GimpTool if (state & GDK_BUTTON3_MASK) gimp_paint_core_cancel (core, drawable); else - gimp_paint_core_finish (core, drawable); + gimp_paint_core_finish (core, drawable, TRUE); gimp_image_flush (display->image); Index: app/tools/gimpvectortool.c =================================================================== RCS file: /cvs/gnome/gimp/app/tools/gimpvectortool.c,v retrieving revision 1.125 retrieving revision 1.125.2.1 diff -u -p -r1.125 -r1.125.2.1 --- app/tools/gimpvectortool.c 1 Jun 2006 20:30:51 -0000 1.125 +++ app/tools/gimpvectortool.c 25 Jul 2006 18:18:07 -0000 1.125.2.1 @@ -640,6 +640,7 @@ gimp_vector_tool_motion (GimpTool GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool); GimpVectorOptions *options; GimpAnchor *anchor; + GimpImage *image; options = GIMP_VECTOR_OPTIONS (tool->tool_info->tool_options); @@ -735,6 +736,9 @@ gimp_vector_tool_motion (GimpTool vector_tool->last_y = coords->y; gimp_vectors_thaw (vector_tool->vectors); + + image = gimp_item_get_image (GIMP_ITEM (vector_tool->vectors)); + gimp_image_flush (image); } static gboolean Index: app/vectors/Makefile.am =================================================================== RCS file: /cvs/gnome/gimp/app/vectors/Makefile.am,v retrieving revision 1.18 retrieving revision 1.18.2.2 diff -u -p -r1.18 -r1.18.2.2 --- app/vectors/Makefile.am 9 Mar 2005 16:58:54 -0000 1.18 +++ app/vectors/Makefile.am 11 Aug 2006 20:23:17 -0000 1.18.2.2 @@ -23,6 +23,14 @@ libappvectors_a_SOURCES = \ gimpbezierstroke.c \ gimpstroke.h \ gimpstroke.c \ + gimpvectorlayer.h \ + gimpvectorlayer.c \ + gimpvectorlayer-xcf.h \ + gimpvectorlayer-xcf.c \ + gimpvectorlayeroptions.h \ + gimpvectorlayeroptions.c \ + gimpvectorlayeroptions-parasite.h \ + gimpvectorlayeroptions-parasite.c \ gimpvectors.c \ gimpvectors.h \ gimpvectors-compat.c \ Index: app/vectors/gimpvectors.c =================================================================== RCS file: /cvs/gnome/gimp/app/vectors/gimpvectors.c,v retrieving revision 1.93 retrieving revision 1.93.2.1 diff -u -p -r1.93 -r1.93.2.1 --- app/vectors/gimpvectors.c 15 May 2006 09:46:21 -0000 1.93 +++ app/vectors/gimpvectors.c 22 Jul 2006 20:26:10 -0000 1.93.2.1 @@ -108,7 +108,8 @@ static void gimp_vectors_transform GimpProgress *progress); static gboolean gimp_vectors_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc); + GimpStrokeDesc *stroke_desc, + gboolean push_undo); static void gimp_vectors_real_thaw (GimpVectors *vectors); static void gimp_vectors_real_stroke_add (GimpVectors *vectors, @@ -492,7 +493,8 @@ gimp_vectors_transform (GimpItem static gboolean gimp_vectors_stroke (GimpItem *item, GimpDrawable *drawable, - GimpStrokeDesc *stroke_desc) + GimpStrokeDesc *stroke_desc, + gboolean push_undo) { GimpVectors *vectors = GIMP_VECTORS (item); gboolean retval = FALSE; @@ -506,7 +508,8 @@ gimp_vectors_stroke (GimpItem *ite case GIMP_STROKE_METHOD_LIBART: gimp_drawable_stroke_vectors (drawable, stroke_desc->stroke_options, - vectors); + vectors, + push_undo); retval = TRUE; break; @@ -518,7 +521,8 @@ gimp_vectors_stroke (GimpItem *ite retval = gimp_paint_core_stroke_vectors (core, drawable, stroke_desc->paint_options, - vectors); + vectors, + push_undo); g_object_unref (core); } Index: app/vectors/vectors-types.h =================================================================== RCS file: /cvs/gnome/gimp/app/vectors/vectors-types.h,v retrieving revision 1.8 retrieving revision 1.8.6.2 diff -u -p -r1.8 -r1.8.6.2 --- app/vectors/vectors-types.h 7 Sep 2003 10:29:10 -0000 1.8 +++ app/vectors/vectors-types.h 11 Aug 2006 20:23:17 -0000 1.8.6.2 @@ -52,5 +52,8 @@ typedef struct _GimpVectors GimpVec typedef struct _GimpStroke GimpStroke; typedef struct _GimpBezierStroke GimpBezierStroke; +typedef struct _GimpVectorLayer GimpVectorLayer; +typedef struct _GimpVectorLayerOptions GimpVectorLayerOptions; + #endif /* __VECTORS_TYPES_H__ */ Index: app/xcf/xcf-load.c =================================================================== RCS file: /cvs/gnome/gimp/app/xcf/xcf-load.c,v retrieving revision 1.76 retrieving revision 1.76.2.1 diff -u -p -r1.76 -r1.76.2.1 --- app/xcf/xcf-load.c 11 Jul 2006 20:21:18 -0000 1.76 +++ app/xcf/xcf-load.c 11 Aug 2006 20:23:22 -0000 1.76.2.1 @@ -58,6 +58,8 @@ #include "vectors/gimpbezierstroke.h" #include "vectors/gimpvectors.h" #include "vectors/gimpvectors-compat.h" +#include "vectors/gimpvectorlayer.h" +#include "vectors/gimpvectorlayer-xcf.h" #include "xcf-private.h" #include "xcf-load.h" @@ -916,7 +918,7 @@ xcf_load_layer (XcfInfo *info, xcf_progress_update (info); - /* call the evil text layer hack that might change our layer pointer */ + /* call the evil text and vector layer hacks that might change our layer pointer */ active = (info->active_layer == layer); floating = (info->floating_sel == layer); @@ -925,6 +927,13 @@ xcf_load_layer (XcfInfo *info, gimp_text_layer_set_xcf_flags (GIMP_TEXT_LAYER (layer), text_layer_flags); + if (active) + info->active_layer = layer; + if (floating) + info->floating_sel = layer; + } + else if (gimp_vector_layer_xcf_load_hack (&layer)) + { if (active) info->active_layer = layer; if (floating) Index: app/xcf/xcf-save.c =================================================================== RCS file: /cvs/gnome/gimp/app/xcf/xcf-save.c,v retrieving revision 1.53 retrieving revision 1.53.2.1 diff -u -p -r1.53 -r1.53.2.1 --- app/xcf/xcf-save.c 11 Jul 2006 20:21:18 -0000 1.53 +++ app/xcf/xcf-save.c 11 Aug 2006 20:23:22 -0000 1.53.2.1 @@ -55,6 +55,8 @@ #include "vectors/gimpbezierstroke.h" #include "vectors/gimpvectors.h" #include "vectors/gimpvectors-compat.h" +#include "vectors/gimpvectorlayer.h" +#include "vectors/gimpvectorlayer-xcf.h" #include "xcf-private.h" #include "xcf-read.h" @@ -561,6 +563,12 @@ xcf_save_layer_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, image, PROP_TEXT_LAYER_FLAGS, error, flags)); + } + else if (GIMP_IS_VECTOR_LAYER (layer) && GIMP_VECTOR_LAYER (layer)->options) + { + GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (layer); + + gimp_vector_layer_xcf_save_prepare (vector_layer); } if (gimp_parasite_list_length (GIMP_ITEM (layer)->parasites) > 0) Index: menus/image-menu.xml.in =================================================================== RCS file: /cvs/gnome/gimp/menus/image-menu.xml.in,v retrieving revision 1.81 retrieving revision 1.81.2.2 diff -u -p -r1.81 -r1.81.2.2 --- menus/image-menu.xml.in 16 Jun 2006 17:02:14 -0000 1.81 +++ menus/image-menu.xml.in 21 Aug 2006 03:35:49 -0000 1.81.2.2 @@ -337,10 +337,14 @@ - - - + + + + + + + Index: menus/layers-menu.xml =================================================================== RCS file: /cvs/gnome/gimp/menus/layers-menu.xml,v retrieving revision 1.8 retrieving revision 1.8.2.3 diff -u -p -r1.8 -r1.8.2.3 --- menus/layers-menu.xml 16 Jun 2006 17:02:14 -0000 1.8 +++ menus/layers-menu.xml 21 Aug 2006 03:35:50 -0000 1.8.2.3 @@ -4,6 +4,7 @@ + @@ -22,6 +23,9 @@ + + + Index: menus/vectors-menu.xml =================================================================== RCS file: /cvs/gnome/gimp/menus/vectors-menu.xml,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -p -r1.5 -r1.5.2.1 --- menus/vectors-menu.xml 16 Jun 2006 17:02:14 -0000 1.5 +++ menus/vectors-menu.xml 22 Jul 2006 20:26:13 -0000 1.5.2.1 @@ -13,6 +13,7 @@ + Index: tools/pdbgen/pdb/edit.pdb =================================================================== RCS file: /cvs/gnome/gimp/tools/pdbgen/pdb/edit.pdb,v retrieving revision 1.54 retrieving revision 1.54.2.1 diff -u -p -r1.54 -r1.54.2.1 --- tools/pdbgen/pdb/edit.pdb 14 Jun 2006 08:32:07 -0000 1.54 +++ tools/pdbgen/pdb/edit.pdb 22 Jul 2006 20:26:14 -0000 1.54.2.1 @@ -705,7 +705,7 @@ HELP g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL); success = gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)), - drawable, context, desc, TRUE); + drawable, context, desc, TRUE, TRUE); g_object_unref (desc); } Index: tools/pdbgen/pdb/paint_tools.pdb =================================================================== RCS file: /cvs/gnome/gimp/tools/pdbgen/pdb/paint_tools.pdb,v retrieving revision 1.90 retrieving revision 1.90.2.1 diff -u -p -r1.90 -r1.90.2.1 --- tools/pdbgen/pdb/paint_tools.pdb 14 Jun 2006 08:32:07 -0000 1.90 +++ tools/pdbgen/pdb/paint_tools.pdb 22 Jul 2006 20:26:15 -0000 1.90.2.1 @@ -819,7 +819,7 @@ paint_tools_stroke (Gimp *gi } retval = gimp_paint_core_stroke (core, drawable, options, - coords, n_strokes); + coords, n_strokes, TRUE); g_free (coords); Index: tools/pdbgen/pdb/paths.pdb =================================================================== RCS file: /cvs/gnome/gimp/tools/pdbgen/pdb/paths.pdb,v retrieving revision 1.59 retrieving revision 1.59.2.1 diff -u -p -r1.59 -r1.59.2.1 --- tools/pdbgen/pdb/paths.pdb 18 May 2006 17:25:15 -0000 1.59 +++ tools/pdbgen/pdb/paths.pdb 22 Jul 2006 20:26:21 -0000 1.59.2.1 @@ -282,7 +282,7 @@ sub path_stroke_current { g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL); success = gimp_item_stroke (GIMP_ITEM (vectors), - drawable, context, desc, TRUE); + drawable, context, desc, TRUE, TRUE); g_object_unref (desc); }