libgimp, app, pdb: Rename GimpVectors to GimpPath

This commit renames the GimpVectors
object to GimpPath in both app/core and
in libgimp. It also renames the files
to gimppath.[ch] and updates the relevant
build and translation files.
There are still outstanding gimp_vectors_* ()
functions on the app side that need to be renamed
in a subsequent commit.
This commit is contained in:
Alx Sa 2024-07-12 06:16:25 +00:00
parent 813277ebe4
commit e8df68fb65
111 changed files with 1212 additions and 1212 deletions

View file

@ -61,8 +61,8 @@
#include "text/gimptext-vectors.h" #include "text/gimptext-vectors.h"
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimpvectors-warp.h" #include "vectors/gimpvectors-warp.h"
#include "widgets/gimpaction.h" #include "widgets/gimpaction.h"
@ -1052,8 +1052,8 @@ layers_text_to_vectors_cmd_callback (GimpAction *action,
if (GIMP_IS_TEXT_LAYER (layer)) if (GIMP_IS_TEXT_LAYER (layer))
{ {
GimpVectors *path; GimpPath *path;
gint x, y; gint x, y;
path = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text); path = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text);
@ -1077,7 +1077,7 @@ layers_text_along_vectors_cmd_callback (GimpAction *action,
GList *layers; GList *layers;
GList *paths; GList *paths;
GimpLayer *layer; GimpLayer *layer;
GimpVectors *vectors; GimpPath *vectors;
return_if_no_layers (image, layers, data); return_if_no_layers (image, layers, data);
return_if_no_vectors_list (image, paths, data); return_if_no_vectors_list (image, paths, data);
@ -1088,10 +1088,10 @@ layers_text_along_vectors_cmd_callback (GimpAction *action,
vectors = paths->data; vectors = paths->data;
if (GIMP_IS_TEXT_LAYER (layer)) if (GIMP_IS_TEXT_LAYER (layer))
{ {
gdouble box_width; gdouble box_width;
gdouble box_height; gdouble box_height;
GimpVectors *new_vectors; GimpPath *new_vectors;
gdouble offset; gdouble offset;
box_width = gimp_item_get_width (GIMP_ITEM (layer)); box_width = gimp_item_get_width (GIMP_ITEM (layer));
box_height = gimp_item_get_height (GIMP_ITEM (layer)); box_height = gimp_item_get_height (GIMP_ITEM (layer));

View file

@ -44,7 +44,7 @@
#include "pdb/gimppdb.h" #include "pdb/gimppdb.h"
#include "pdb/gimpprocedure.h" #include "pdb/gimpprocedure.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectors-export.h" #include "vectors/gimpvectors-export.h"
#include "vectors/gimpvectors-import.h" #include "vectors/gimpvectors-import.h"
@ -73,7 +73,7 @@
static void vectors_new_callback (GtkWidget *dialog, static void vectors_new_callback (GtkWidget *dialog,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
const gchar *vectors_name, const gchar *vectors_name,
gboolean vectors_visible, gboolean vectors_visible,
@ -84,7 +84,7 @@ static void vectors_new_callback (GtkWidget *dialog,
gpointer user_data); gpointer user_data);
static void vectors_edit_attributes_callback (GtkWidget *dialog, static void vectors_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
const gchar *vectors_name, const gchar *vectors_name,
gboolean vectors_visible, gboolean vectors_visible,
@ -148,7 +148,7 @@ vectors_edit_attributes_cmd_callback (GimpAction *action,
{ {
GimpImage *image; GimpImage *image;
GList *paths; GList *paths;
GimpVectors *vectors; GimpPath *vectors;
GtkWidget *widget; GtkWidget *widget;
GtkWidget *dialog; GtkWidget *dialog;
return_if_no_vectors_list (image, paths, data); return_if_no_vectors_list (image, paths, data);
@ -238,7 +238,7 @@ vectors_new_last_vals_cmd_callback (GimpAction *action,
gpointer data) gpointer data)
{ {
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpPath *vectors;
GimpDialogConfig *config; GimpDialogConfig *config;
return_if_no_image (image, data); return_if_no_image (image, data);
@ -423,10 +423,10 @@ vectors_duplicate_cmd_callback (GimpAction *action,
_("Duplicate Paths")); _("Duplicate Paths"));
for (iter = paths; iter; iter = iter->next) for (iter = paths; iter; iter = iter->next)
{ {
GimpVectors *new_path; GimpPath *new_path;
new_path = GIMP_VECTORS (gimp_item_duplicate (iter->data, new_path = GIMP_PATH (gimp_item_duplicate (iter->data,
G_TYPE_FROM_INSTANCE (iter->data))); G_TYPE_FROM_INSTANCE (iter->data)));
/* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because /* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because
* the latter would add a duplicated group inside itself instead of * the latter would add a duplicated group inside itself instead of
* above it * above it
@ -820,7 +820,7 @@ vectors_color_tag_cmd_callback (GimpAction *action,
static void static void
vectors_new_callback (GtkWidget *dialog, vectors_new_callback (GtkWidget *dialog,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
const gchar *vectors_name, const gchar *vectors_name,
gboolean vectors_visible, gboolean vectors_visible,
@ -853,7 +853,7 @@ vectors_new_callback (GtkWidget *dialog,
static void static void
vectors_edit_attributes_callback (GtkWidget *dialog, vectors_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
const gchar *vectors_name, const gchar *vectors_name,
gboolean vectors_visible, gboolean vectors_visible,
@ -1006,7 +1006,7 @@ vectors_select_cmd_callback (GimpAction *action,
for (iter = vectors; iter || run_once; iter = iter ? iter->next : NULL) for (iter = vectors; iter || run_once; iter = iter ? iter->next : NULL)
{ {
GimpVectors *new_vec; GimpPath *new_vec;
GimpContainer *container; GimpContainer *container;
if (iter) if (iter)
@ -1018,9 +1018,9 @@ vectors_select_cmd_callback (GimpAction *action,
container = gimp_image_get_paths (image); container = gimp_image_get_paths (image);
run_once = FALSE; run_once = FALSE;
} }
new_vec = (GimpVectors *) action_select_object (select_type, new_vec = (GimpPath *) action_select_object (select_type,
container, container,
iter ? iter->data : NULL); iter ? iter->data : NULL);
if (new_vec) if (new_vec)
new_vectors = g_list_prepend (new_vectors, new_vec); new_vectors = g_list_prepend (new_vectors, new_vec);
} }

View file

@ -781,11 +781,11 @@ typedef enum /*< pdb-skip, skip >*/
{ {
GIMP_ITEM_TYPE_LAYERS = 1 << 0, GIMP_ITEM_TYPE_LAYERS = 1 << 0,
GIMP_ITEM_TYPE_CHANNELS = 1 << 1, GIMP_ITEM_TYPE_CHANNELS = 1 << 1,
GIMP_ITEM_TYPE_VECTORS = 1 << 2, GIMP_ITEM_TYPE_PATHS = 1 << 2,
GIMP_ITEM_TYPE_ALL = (GIMP_ITEM_TYPE_LAYERS | GIMP_ITEM_TYPE_ALL = (GIMP_ITEM_TYPE_LAYERS |
GIMP_ITEM_TYPE_CHANNELS | GIMP_ITEM_TYPE_CHANNELS |
GIMP_ITEM_TYPE_VECTORS) GIMP_ITEM_TYPE_PATHS)
} GimpItemTypeMask; } GimpItemTypeMask;

View file

@ -37,7 +37,7 @@
#include "gimpimage-new.h" #include "gimpimage-new.h"
#include "gimplayer.h" #include "gimplayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
typedef struct typedef struct
@ -492,7 +492,7 @@ gimp_channel_combine_buffer (GimpChannel *mask,
* their opacity, mode, visibility, etc. properties within the image * their opacity, mode, visibility, etc. properties within the image
* (similar as if a "merge visible" had been applied to the image then * (similar as if a "merge visible" had been applied to the image then
* the resulting layer used alone). * the resulting layer used alone).
* If @items contain channels or vectors, they will be added as a set * If @items contain channels or paths, they will be added as a set
* (i.e. as a single item which is an union of other items). E.g. an * (i.e. as a single item which is an union of other items). E.g. an
* combine in GIMP_CHANNEL_OP_INTERSECT mode does not intersect all * combine in GIMP_CHANNEL_OP_INTERSECT mode does not intersect all
* @items with each other and @channel. It first adds-alike all @items * @items with each other and @channel. It first adds-alike all @items
@ -518,7 +518,7 @@ gimp_channel_combine_items (GimpChannel *mask,
{ {
g_return_if_fail (GIMP_IS_LAYER (iter->data) || g_return_if_fail (GIMP_IS_LAYER (iter->data) ||
GIMP_IS_CHANNEL (iter->data) || GIMP_IS_CHANNEL (iter->data) ||
GIMP_IS_VECTORS (iter->data)); GIMP_IS_PATH (iter->data));
if (items_image == NULL) if (items_image == NULL)
items_image = gimp_item_get_image (iter->data); items_image = gimp_item_get_image (iter->data);

View file

@ -43,8 +43,8 @@
#include "gimppickable-contiguous-region.h" #include "gimppickable-contiguous-region.h"
#include "gimpscanconvert.h" #include "gimpscanconvert.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -281,7 +281,7 @@ gimp_channel_select_polygon (GimpChannel *channel,
void void
gimp_channel_select_vectors (GimpChannel *channel, gimp_channel_select_vectors (GimpChannel *channel,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *vectors, GimpPath *vectors,
GimpChannelOps op, GimpChannelOps op,
gboolean antialias, gboolean antialias,
gboolean feather, gboolean feather,
@ -294,7 +294,7 @@ gimp_channel_select_vectors (GimpChannel *channel,
g_return_if_fail (GIMP_IS_CHANNEL (channel)); g_return_if_fail (GIMP_IS_CHANNEL (channel));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (channel))); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (channel)));
g_return_if_fail (undo_desc != NULL); g_return_if_fail (undo_desc != NULL);
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
bezier = gimp_vectors_get_bezier (vectors); bezier = gimp_vectors_get_bezier (vectors);

View file

@ -81,7 +81,7 @@ void gimp_channel_select_polygon (GimpChannel *channel,
gboolean push_undo); gboolean push_undo);
void gimp_channel_select_vectors (GimpChannel *channel, void gimp_channel_select_vectors (GimpChannel *channel,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *vectors, GimpPath *vectors,
GimpChannelOps op, GimpChannelOps op,
gboolean antialias, gboolean antialias,
gboolean feather, gboolean feather,

View file

@ -43,7 +43,7 @@
#include "gimppickable.h" #include "gimppickable.h"
#include "gimpscanconvert.h" #include "gimpscanconvert.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -179,7 +179,7 @@ gimp_drawable_fill_boundary (GimpDrawable *drawable,
gboolean gboolean
gimp_drawable_fill_vectors (GimpDrawable *drawable, gimp_drawable_fill_vectors (GimpDrawable *drawable,
GimpFillOptions *options, GimpFillOptions *options,
GimpVectors *vectors, GimpPath *vectors,
gboolean push_undo, gboolean push_undo,
GError **error) GError **error)
{ {
@ -188,7 +188,7 @@ gimp_drawable_fill_vectors (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_FILL_OPTIONS (options), FALSE); g_return_val_if_fail (GIMP_IS_FILL_OPTIONS (options), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
g_return_val_if_fail (gimp_fill_options_get_style (options) != g_return_val_if_fail (gimp_fill_options_get_style (options) !=
GIMP_FILL_STYLE_PATTERN || GIMP_FILL_STYLE_PATTERN ||
gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL, gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL,

View file

@ -47,7 +47,7 @@ void gimp_drawable_fill_boundary (GimpDrawable *drawable,
gboolean gimp_drawable_fill_vectors (GimpDrawable *drawable, gboolean gimp_drawable_fill_vectors (GimpDrawable *drawable,
GimpFillOptions *options, GimpFillOptions *options,
GimpVectors *vectors, GimpPath *vectors,
gboolean push_undo, gboolean push_undo,
GError **error); GError **error);

View file

@ -36,7 +36,7 @@
#include "gimpscanconvert.h" #include "gimpscanconvert.h"
#include "gimpstrokeoptions.h" #include "gimpstrokeoptions.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -76,7 +76,7 @@ gimp_drawable_stroke_boundary (GimpDrawable *drawable,
gboolean gboolean
gimp_drawable_stroke_vectors (GimpDrawable *drawable, gimp_drawable_stroke_vectors (GimpDrawable *drawable,
GimpStrokeOptions *options, GimpStrokeOptions *options,
GimpVectors *vectors, GimpPath *vectors,
gboolean push_undo, gboolean push_undo,
GError **error) GError **error)
{ {
@ -85,7 +85,7 @@ gimp_drawable_stroke_vectors (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_STROKE_OPTIONS (options), FALSE); g_return_val_if_fail (GIMP_IS_STROKE_OPTIONS (options), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
g_return_val_if_fail (gimp_fill_options_get_style (GIMP_FILL_OPTIONS (options)) != g_return_val_if_fail (gimp_fill_options_get_style (GIMP_FILL_OPTIONS (options)) !=
GIMP_FILL_STYLE_PATTERN || GIMP_FILL_STYLE_PATTERN ||
gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL, gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL,

View file

@ -32,7 +32,7 @@ void gimp_drawable_stroke_boundary (GimpDrawable *drawable,
gboolean gimp_drawable_stroke_vectors (GimpDrawable *drawable, gboolean gimp_drawable_stroke_vectors (GimpDrawable *drawable,
GimpStrokeOptions *options, GimpStrokeOptions *options,
GimpVectors *vectors, GimpPath *vectors,
gboolean push_undo, gboolean push_undo,
GError **error); GError **error);

View file

@ -26,7 +26,7 @@
#include "gegl/gimp-gegl-loops.h" #include "gegl/gimp-gegl-loops.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp.h" #include "gimp.h"
#include "gimpchannel.h" #include "gimpchannel.h"
@ -127,7 +127,7 @@ gimp_image_duplicate (GimpImage *image)
/* Copy the channels */ /* Copy the channels */
active_channels = gimp_image_duplicate_channels (image, new_image); active_channels = gimp_image_duplicate_channels (image, new_image);
/* Copy any vectors */ /* Copy any path */
active_path = gimp_image_duplicate_paths (image, new_image); active_path = gimp_image_duplicate_paths (image, new_image);
/* Copy floating layer */ /* Copy floating layer */
@ -136,7 +136,7 @@ gimp_image_duplicate (GimpImage *image)
/* Copy the selection mask */ /* Copy the selection mask */
gimp_image_duplicate_mask (image, new_image); gimp_image_duplicate_mask (image, new_image);
/* Set active layer, active channel, active vectors */ /* Set active layer, active channel, active path */
if (active_layers) if (active_layers)
gimp_image_set_selected_layers (new_image, active_layers); gimp_image_set_selected_layers (new_image, active_layers);
@ -351,11 +351,11 @@ gimp_image_duplicate_paths (GimpImage *image,
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {
GimpVectors *path = list->data; GimpPath *path = list->data;
GimpVectors *new_path; GimpPath *new_path;
new_path = GIMP_VECTORS (gimp_image_duplicate_item (GIMP_ITEM (path), new_path = GIMP_PATH (gimp_image_duplicate_item (GIMP_ITEM (path),
new_image)); new_image));
if (g_list_find (selected_path, path)) if (g_list_find (selected_path, path))
new_selected_path = g_list_prepend (new_selected_path, new_path); new_selected_path = g_list_prepend (new_selected_path, new_path);

View file

@ -34,7 +34,7 @@
#include "gimpobjectqueue.h" #include "gimpobjectqueue.h"
#include "gimpprogress.h" #include "gimpprogress.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -342,7 +342,7 @@ gimp_image_item_list_get_list (GimpImage *image,
g_list_free (all_items); g_list_free (all_items);
} }
if (type & GIMP_ITEM_TYPE_VECTORS) if (type & GIMP_ITEM_TYPE_PATHS)
{ {
all_items = gimp_image_get_path_list (image); all_items = gimp_image_get_path_list (image);

View file

@ -32,7 +32,7 @@
#include "gegl/gimp-gegl-nodes.h" #include "gegl/gimp-gegl-nodes.h"
#include "gegl/gimp-gegl-utils.h" #include "gegl/gimp-gegl-utils.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp.h" #include "gimp.h"
#include "gimpcontext.h" #include "gimpcontext.h"
@ -468,13 +468,13 @@ gimp_image_merge_group_layer (GimpImage *image,
/* merging paths */ /* merging paths */
GimpVectors * GimpPath *
gimp_image_merge_visible_paths (GimpImage *image, gimp_image_merge_visible_paths (GimpImage *image,
GError **error) GError **error)
{ {
GList *list; GList *list;
GList *merge_list = NULL; GList *merge_list = NULL;
GimpVectors *path; GimpPath *path;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
@ -493,22 +493,22 @@ gimp_image_merge_visible_paths (GimpImage *image,
if (merge_list && merge_list->next) if (merge_list && merge_list->next)
{ {
GimpVectors *target_path; GimpPath *target_path;
gchar *name; gchar *name;
gint pos; gint pos;
gimp_set_busy (image->gimp); gimp_set_busy (image->gimp);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE,
C_("undo-type", "Merge Visible Paths")); C_("undo-type", "Merge Visible Paths"));
path = GIMP_VECTORS (merge_list->data); path = GIMP_PATH (merge_list->data);
name = g_strdup (gimp_object_get_name (path)); name = g_strdup (gimp_object_get_name (path));
pos = gimp_item_get_index (GIMP_ITEM (path)); pos = gimp_item_get_index (GIMP_ITEM (path));
target_path = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (path), target_path = GIMP_PATH (gimp_item_duplicate (GIMP_ITEM (path),
GIMP_TYPE_VECTORS)); GIMP_TYPE_PATH));
gimp_image_remove_path (image, path, TRUE, NULL); gimp_image_remove_path (image, path, TRUE, NULL);
for (list = g_list_next (merge_list); for (list = g_list_next (merge_list);

View file

@ -39,7 +39,7 @@ GimpLayer * gimp_image_flatten (GimpImage *image,
GimpProgress *progress, GimpProgress *progress,
GError **error); GError **error);
GimpVectors * gimp_image_merge_visible_paths (GimpImage *image, GimpPath * gimp_image_merge_visible_paths (GimpImage *image,
GError **error); GError **error);

View file

@ -34,8 +34,8 @@
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
GimpLayer * GimpLayer *
@ -185,17 +185,17 @@ gimp_image_pick_text_layer (GimpImage *image,
return NULL; return NULL;
} }
GimpVectors * GimpPath *
gimp_image_pick_path (GimpImage *image, gimp_image_pick_path (GimpImage *image,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble epsilon_x, gdouble epsilon_x,
gdouble epsilon_y) gdouble epsilon_y)
{ {
GimpVectors *ret = NULL; GimpPath *ret = NULL;
GList *all_path; GList *all_path;
GList *list; GList *list;
gdouble mindist = G_MAXDOUBLE; gdouble mindist = G_MAXDOUBLE;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
@ -203,7 +203,7 @@ gimp_image_pick_path (GimpImage *image,
for (list = all_path; list; list = g_list_next (list)) for (list = all_path; list; list = g_list_next (list))
{ {
GimpVectors *vectors = list->data; GimpPath *vectors = list->data;
if (gimp_item_is_visible (GIMP_ITEM (vectors))) if (gimp_item_is_visible (GIMP_ITEM (vectors)))
{ {

View file

@ -30,7 +30,7 @@ GimpTextLayer * gimp_image_pick_text_layer (GimpImage *image,
gint x, gint x,
gint y); gint y);
GimpVectors * gimp_image_pick_path (GimpImage *image, GimpPath * gimp_image_pick_path (GimpImage *image,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble epsilon_x, gdouble epsilon_x,

View file

@ -25,7 +25,7 @@
#include "config/gimpdialogconfig.h" #include "config/gimpdialogconfig.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp.h" #include "gimp.h"
#include "gimpcontainer.h" #include "gimpcontainer.h"
@ -132,7 +132,7 @@ gimp_image_rotate (GimpImage *image,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ROTATE, NULL); gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ROTATE, NULL);
/* Rotate all layers, channels (including selection mask), and vectors */ /* Rotate all layers, channels (including selection mask), and path */
while ((item = gimp_object_queue_pop (queue))) while ((item = gimp_object_queue_pop (queue)))
{ {
gint off_x; gint off_x;
@ -150,7 +150,7 @@ gimp_image_rotate (GimpImage *image,
{ {
gimp_item_set_offset (item, 0, 0); gimp_item_set_offset (item, 0, 0);
if (GIMP_IS_VECTORS (item)) if (GIMP_IS_PATH (item))
{ {
gimp_item_set_size (item, new_image_width, new_image_height); gimp_item_set_size (item, new_image_width, new_image_height);

View file

@ -33,8 +33,8 @@
#include "gimpimage-guides.h" #include "gimpimage-guides.h"
#include "gimpimage-snap.h" #include "gimpimage-snap.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -728,7 +728,7 @@ gimp_image_snap_point (GimpImage *image,
for (iter = selected_path; iter; iter = iter->next) for (iter = selected_path; iter; iter = iter->next)
{ {
GimpVectors *vectors = iter->data; GimpPath *vectors = iter->data;
while ((stroke = gimp_vectors_stroke_get_next (vectors, stroke))) while ((stroke = gimp_vectors_stroke_get_next (vectors, stroke)))
{ {
@ -977,7 +977,7 @@ gimp_image_snap_rectangle (GimpImage *image,
for (iter = selected_path; iter; iter = iter->next) for (iter = selected_path; iter; iter = iter->next)
{ {
GimpVectors *vectors = iter->data; GimpPath *vectors = iter->data;
while ((stroke = gimp_vectors_stroke_get_next (vectors, stroke))) while ((stroke = gimp_vectors_stroke_get_next (vectors, stroke)))
{ {

View file

@ -27,7 +27,7 @@
#include "core-types.h" #include "core-types.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp.h" #include "gimp.h"
#include "gimp-transform-resize.h" #include "gimp-transform-resize.h"
@ -279,7 +279,7 @@ gimp_image_transform (GimpImage *image,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_TRANSFORM, NULL); gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_TRANSFORM, NULL);
/* Transform all layers, channels (including selection mask), and vectors */ /* Transform all layers, channels (including selection mask), and path */
while ((item = gimp_object_queue_pop (queue))) while ((item = gimp_object_queue_pop (queue)))
{ {
GimpTransformResize clip = GIMP_TRANSFORM_RESIZE_ADJUST; GimpTransformResize clip = GIMP_TRANSFORM_RESIZE_ADJUST;
@ -293,7 +293,7 @@ gimp_image_transform (GimpImage *image,
interpolation_type, clip, interpolation_type, clip,
progress); progress);
if (GIMP_IS_VECTORS (item)) if (GIMP_IS_PATH (item))
gimp_item_set_size (item, new_bounds.width, new_bounds.height); gimp_item_set_size (item, new_bounds.width, new_bounds.height);
} }

View file

@ -56,7 +56,7 @@
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "text/gimptextundo.h" #include "text/gimptextundo.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectorsmodundo.h" #include "vectors/gimpvectorsmodundo.h"
#include "vectors/gimpvectorspropundo.h" #include "vectors/gimpvectorspropundo.h"
#include "vectors/gimpvectorsundo.h" #include "vectors/gimpvectorsundo.h"
@ -1011,17 +1011,17 @@ gimp_image_undo_push_channel_color (GimpImage *image,
GimpUndo * GimpUndo *
gimp_image_undo_push_path_add (GimpImage *image, gimp_image_undo_push_path_add (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path, GimpPath *path,
GList *prev_paths) GList *prev_paths)
{ {
GList *iter; GList *iter;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_VECTORS (path), NULL); g_return_val_if_fail (GIMP_IS_PATH (path), NULL);
g_return_val_if_fail (! gimp_item_is_attached (GIMP_ITEM (path)), NULL); g_return_val_if_fail (! gimp_item_is_attached (GIMP_ITEM (path)), NULL);
for (iter = prev_paths; iter; iter = iter->next) for (iter = prev_paths; iter; iter = iter->next)
g_return_val_if_fail (GIMP_IS_VECTORS (iter->data), NULL); g_return_val_if_fail (GIMP_IS_PATH (iter->data), NULL);
return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_UNDO, return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_UNDO,
GIMP_UNDO_VECTORS_ADD, undo_desc, GIMP_UNDO_VECTORS_ADD, undo_desc,
@ -1034,21 +1034,21 @@ gimp_image_undo_push_path_add (GimpImage *image,
GimpUndo * GimpUndo *
gimp_image_undo_push_path_remove (GimpImage *image, gimp_image_undo_push_path_remove (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path, GimpPath *path,
GimpVectors *prev_parent, GimpPath *prev_parent,
gint prev_position, gint prev_position,
GList *prev_paths) GList *prev_paths)
{ {
GList *iter; GList *iter;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_VECTORS (path), NULL); g_return_val_if_fail (GIMP_IS_PATH (path), NULL);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (path)), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (path)), NULL);
g_return_val_if_fail (prev_parent == NULL || GIMP_IS_VECTORS (prev_parent), g_return_val_if_fail (prev_parent == NULL || GIMP_IS_PATH (prev_parent),
NULL); NULL);
for (iter = prev_paths; iter; iter = iter->next) for (iter = prev_paths; iter; iter = iter->next)
g_return_val_if_fail (GIMP_IS_VECTORS (iter->data), NULL); g_return_val_if_fail (GIMP_IS_PATH (iter->data), NULL);
return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_UNDO, return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_UNDO,
GIMP_UNDO_VECTORS_REMOVE, undo_desc, GIMP_UNDO_VECTORS_REMOVE, undo_desc,
@ -1063,10 +1063,10 @@ gimp_image_undo_push_path_remove (GimpImage *image,
GimpUndo * GimpUndo *
gimp_image_undo_push_path_mod (GimpImage *image, gimp_image_undo_push_path_mod (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path) GimpPath *path)
{ {
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_VECTORS (path), NULL); g_return_val_if_fail (GIMP_IS_PATH (path), NULL);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (path)), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (path)), NULL);
return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_MOD_UNDO, return gimp_image_undo_push (image, GIMP_TYPE_VECTORS_MOD_UNDO,

View file

@ -250,17 +250,17 @@ GimpUndo * gimp_image_undo_push_channel_color (GimpImage *image,
GimpUndo * gimp_image_undo_push_path_add (GimpImage *image, GimpUndo * gimp_image_undo_push_path_add (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path, GimpPath *path,
GList *prev_paths); GList *prev_paths);
GimpUndo * gimp_image_undo_push_path_remove (GimpImage *image, GimpUndo * gimp_image_undo_push_path_remove (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path, GimpPath *path,
GimpVectors *prev_parent, GimpPath *prev_parent,
gint prev_position, gint prev_position,
GList *prev_paths); GList *prev_paths);
GimpUndo * gimp_image_undo_push_path_mod (GimpImage *image, GimpUndo * gimp_image_undo_push_path_mod (GimpImage *image,
const gchar *undo_desc, const gchar *undo_desc,
GimpVectors *path); GimpPath *path);
/* floating selection undos */ /* floating selection undos */

View file

@ -85,7 +85,7 @@
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp-log.h" #include "gimp-log.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -798,7 +798,7 @@ gimp_image_init (GimpImage *image)
GIMP_TYPE_CHANNEL); GIMP_TYPE_CHANNEL);
private->vectors = gimp_item_tree_new (image, private->vectors = gimp_item_tree_new (image,
GIMP_TYPE_ITEM_STACK, GIMP_TYPE_ITEM_STACK,
GIMP_TYPE_VECTORS); GIMP_TYPE_PATH);
private->layer_stack = NULL; private->layer_stack = NULL;
private->stored_layer_sets = NULL; private->stored_layer_sets = NULL;
@ -2967,7 +2967,7 @@ gimp_image_get_xcf_version (GimpImage *image,
items = gimp_image_get_path_list (image); items = gimp_image_get_path_list (image);
for (list = items; list; list = g_list_next (list)) for (list = items; list; list = g_list_next (list))
{ {
GimpVectors *vectors = GIMP_VECTORS (list->data); GimpPath *vectors = GIMP_PATH (list->data);
if (gimp_item_get_color_tag (GIMP_ITEM (vectors)) != GIMP_COLOR_TAG_NONE) if (gimp_item_get_color_tag (GIMP_ITEM (vectors)) != GIMP_COLOR_TAG_NONE)
{ {
@ -4512,7 +4512,7 @@ gimp_image_get_projection (GimpImage *image)
} }
/* layers / channels / vectors */ /* layers / channels / path */
GimpItemTree * GimpItemTree *
gimp_image_get_layer_tree (GimpImage *image) gimp_image_get_layer_tree (GimpImage *image)
@ -4671,7 +4671,7 @@ gimp_image_get_path_list (GimpImage *image)
} }
/* active drawable, layer, channel, vectors */ /* active drawable, layer, channel, path */
void void
gimp_image_unset_selected_channels (GimpImage *image) gimp_image_unset_selected_channels (GimpImage *image)
@ -4944,7 +4944,7 @@ gimp_image_set_selected_paths (GimpImage *image,
for (iter = paths; iter; iter = iter->next) for (iter = paths; iter; iter = iter->next)
{ {
g_return_if_fail (GIMP_IS_VECTORS (iter->data)); g_return_if_fail (GIMP_IS_PATH (iter->data));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (iter->data)) && g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (iter->data)) &&
gimp_item_get_image (GIMP_ITEM (iter->data)) == image); gimp_item_get_image (GIMP_ITEM (iter->data)) == image);
} }
@ -4983,7 +4983,7 @@ gimp_image_get_channel_by_tattoo (GimpImage *image,
return GIMP_CHANNEL (gimp_item_stack_get_item_by_tattoo (stack, tattoo)); return GIMP_CHANNEL (gimp_item_stack_get_item_by_tattoo (stack, tattoo));
} }
GimpVectors * GimpPath *
gimp_image_get_path_by_tattoo (GimpImage *image, gimp_image_get_path_by_tattoo (GimpImage *image,
GimpTattoo tattoo) GimpTattoo tattoo)
{ {
@ -4993,11 +4993,11 @@ gimp_image_get_path_by_tattoo (GimpImage *image,
stack = GIMP_ITEM_STACK (gimp_image_get_paths (image)); stack = GIMP_ITEM_STACK (gimp_image_get_paths (image));
return GIMP_VECTORS (gimp_item_stack_get_item_by_tattoo (stack, tattoo)); return GIMP_PATH (gimp_item_stack_get_item_by_tattoo (stack, tattoo));
} }
/* layer, channel, vectors by name */ /* layer, channel, path by name */
GimpLayer * GimpLayer *
gimp_image_get_layer_by_name (GimpImage *image, gimp_image_get_layer_by_name (GimpImage *image,
@ -5027,7 +5027,7 @@ gimp_image_get_channel_by_name (GimpImage *image,
return GIMP_CHANNEL (gimp_item_tree_get_item_by_name (tree, name)); return GIMP_CHANNEL (gimp_item_tree_get_item_by_name (tree, name));
} }
GimpVectors * GimpPath *
gimp_image_get_path_by_name (GimpImage *image, gimp_image_get_path_by_name (GimpImage *image,
const gchar *name) const gchar *name)
{ {
@ -5038,7 +5038,7 @@ gimp_image_get_path_by_name (GimpImage *image,
tree = gimp_image_get_path_tree (image); tree = gimp_image_get_path_tree (image);
return GIMP_VECTORS (gimp_item_tree_get_item_by_name (tree, name)); return GIMP_PATH (gimp_item_tree_get_item_by_name (tree, name));
} }
@ -5447,7 +5447,7 @@ gimp_image_store_item_set (GimpImage *image,
stored_sets = &private->stored_layer_sets; stored_sets = &private->stored_layer_sets;
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
stored_sets = &private->stored_channel_sets; stored_sets = &private->stored_channel_sets;
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
stored_sets = &private->stored_vectors_sets; stored_sets = &private->stored_vectors_sets;
else else
g_return_if_reached (); g_return_if_reached ();
@ -5508,7 +5508,7 @@ gimp_image_unlink_item_set (GimpImage *image,
stored_sets = &private->stored_layer_sets; stored_sets = &private->stored_layer_sets;
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
stored_sets = &private->stored_channel_sets; stored_sets = &private->stored_channel_sets;
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
stored_sets = &private->stored_vectors_sets; stored_sets = &private->stored_vectors_sets;
else else
g_return_val_if_reached (FALSE); g_return_val_if_reached (FALSE);
@ -5547,7 +5547,7 @@ gimp_image_get_stored_item_sets (GimpImage *image,
return private->stored_layer_sets; return private->stored_layer_sets;
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
return private->stored_channel_sets; return private->stored_channel_sets;
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
return private->stored_vectors_sets; return private->stored_vectors_sets;
g_return_val_if_reached (FALSE); g_return_val_if_reached (FALSE);
@ -5581,7 +5581,7 @@ gimp_image_select_item_set (GimpImage *image,
gimp_image_set_selected_layers (image, items); gimp_image_set_selected_layers (image, items);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
gimp_image_set_selected_channels (image, items); gimp_image_set_selected_channels (image, items);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
gimp_image_set_selected_paths (image, items); gimp_image_set_selected_paths (image, items);
else else
g_return_if_reached (); g_return_if_reached ();
@ -5621,7 +5621,7 @@ gimp_image_add_item_set (GimpImage *image,
selected = gimp_image_get_selected_layers (image); selected = gimp_image_get_selected_layers (image);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
selected = gimp_image_get_selected_channels (image); selected = gimp_image_get_selected_channels (image);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
selected = gimp_image_get_selected_paths (image); selected = gimp_image_get_selected_paths (image);
else else
g_return_if_reached (); g_return_if_reached ();
@ -5637,7 +5637,7 @@ gimp_image_add_item_set (GimpImage *image,
gimp_image_set_selected_layers (image, selected); gimp_image_set_selected_layers (image, selected);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
gimp_image_set_selected_channels (image, selected); gimp_image_set_selected_channels (image, selected);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
gimp_image_set_selected_paths (image, items); gimp_image_set_selected_paths (image, items);
g_list_free (selected); g_list_free (selected);
@ -5679,7 +5679,7 @@ gimp_image_remove_item_set (GimpImage *image,
selected = gimp_image_get_selected_layers (image); selected = gimp_image_get_selected_layers (image);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
selected = gimp_image_get_selected_channels (image); selected = gimp_image_get_selected_channels (image);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
selected = gimp_image_get_selected_paths (image); selected = gimp_image_get_selected_paths (image);
else else
g_return_if_reached (); g_return_if_reached ();
@ -5697,7 +5697,7 @@ gimp_image_remove_item_set (GimpImage *image,
gimp_image_set_selected_layers (image, selected); gimp_image_set_selected_layers (image, selected);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
gimp_image_set_selected_channels (image, selected); gimp_image_set_selected_channels (image, selected);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
gimp_image_set_selected_paths (image, items); gimp_image_set_selected_paths (image, items);
g_list_free (selected); g_list_free (selected);
@ -5741,7 +5741,7 @@ gimp_image_intersect_item_set (GimpImage *image,
selected = gimp_image_get_selected_layers (image); selected = gimp_image_get_selected_layers (image);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
selected = gimp_image_get_selected_channels (image); selected = gimp_image_get_selected_channels (image);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
selected = gimp_image_get_selected_paths (image); selected = gimp_image_get_selected_paths (image);
else else
g_return_if_reached (); g_return_if_reached ();
@ -5763,7 +5763,7 @@ gimp_image_intersect_item_set (GimpImage *image,
gimp_image_set_selected_layers (image, selected); gimp_image_set_selected_layers (image, selected);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
gimp_image_set_selected_channels (image, selected); gimp_image_set_selected_channels (image, selected);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
gimp_image_set_selected_paths (image, items); gimp_image_set_selected_paths (image, items);
g_list_free (selected); g_list_free (selected);
@ -5890,11 +5890,11 @@ gimp_image_remove_channel (GimpImage *image,
/* path */ /* path */
gboolean gboolean
gimp_image_add_path (GimpImage *image, gimp_image_add_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
gboolean push_undo) gboolean push_undo)
{ {
GimpImagePrivate *private; GimpImagePrivate *private;
GList *list = NULL; GList *list = NULL;
@ -5930,16 +5930,16 @@ gimp_image_add_path (GimpImage *image,
} }
void void
gimp_image_remove_path (GimpImage *image, gimp_image_remove_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
gboolean push_undo, gboolean push_undo,
GList *new_selected) GList *new_selected)
{ {
GimpImagePrivate *private; GimpImagePrivate *private;
GList *selected_path; GList *selected_path;
g_return_if_fail (GIMP_IS_IMAGE (image)); g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (GIMP_IS_VECTORS (path)); g_return_if_fail (GIMP_IS_PATH (path));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (path))); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (path)));
g_return_if_fail (gimp_item_get_image (GIMP_ITEM (path)) == image); g_return_if_fail (gimp_item_get_image (GIMP_ITEM (path)) == image);

View file

@ -394,14 +394,14 @@ GimpLayer * gimp_image_get_layer_by_tattoo (GimpImage *image,
GimpTattoo tattoo); GimpTattoo tattoo);
GimpChannel * gimp_image_get_channel_by_tattoo (GimpImage *image, GimpChannel * gimp_image_get_channel_by_tattoo (GimpImage *image,
GimpTattoo tattoo); GimpTattoo tattoo);
GimpVectors * gimp_image_get_path_by_tattoo (GimpImage *image, GimpPath * gimp_image_get_path_by_tattoo (GimpImage *image,
GimpTattoo tattoo); GimpTattoo tattoo);
GimpLayer * gimp_image_get_layer_by_name (GimpImage *image, GimpLayer * gimp_image_get_layer_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpChannel * gimp_image_get_channel_by_name (GimpImage *image, GimpChannel * gimp_image_get_channel_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpVectors * gimp_image_get_path_by_name (GimpImage *image, GimpPath * gimp_image_get_path_by_name (GimpImage *image,
const gchar *name); const gchar *name);
gboolean gimp_image_reorder_item (GimpImage *image, gboolean gimp_image_reorder_item (GimpImage *image,
@ -467,12 +467,12 @@ void gimp_image_remove_channel (GimpImage *image,
GList *new_selected); GList *new_selected);
gboolean gimp_image_add_path (GimpImage *image, gboolean gimp_image_add_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
gboolean push_undo); gboolean push_undo);
void gimp_image_remove_path (GimpImage *image, void gimp_image_remove_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
gboolean push_undo, gboolean push_undo,
GList *new_selected); GList *new_selected);

View file

@ -36,7 +36,7 @@
#include "gimplayer.h" #include "gimplayer.h"
#include "gimpmarshal.h" #include "gimpmarshal.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -187,7 +187,7 @@ gimp_item_list_constructed (GObject *object)
gimp_assert (GIMP_IS_IMAGE (set->p->image)); gimp_assert (GIMP_IS_IMAGE (set->p->image));
gimp_assert (set->p->item_type == GIMP_TYPE_LAYER || gimp_assert (set->p->item_type == GIMP_TYPE_LAYER ||
set->p->item_type == GIMP_TYPE_VECTORS || set->p->item_type == GIMP_TYPE_PATH ||
set->p->item_type == GIMP_TYPE_CHANNEL); set->p->item_type == GIMP_TYPE_CHANNEL);
if (! set->p->is_pattern) if (! set->p->is_pattern)
@ -196,7 +196,7 @@ gimp_item_list_constructed (GObject *object)
if (set->p->item_type == GIMP_TYPE_LAYER) if (set->p->item_type == GIMP_TYPE_LAYER)
container = gimp_image_get_layers (set->p->image); container = gimp_image_get_layers (set->p->image);
else if (set->p->item_type == GIMP_TYPE_VECTORS) else if (set->p->item_type == GIMP_TYPE_PATH)
container = gimp_image_get_paths (set->p->image); container = gimp_image_get_paths (set->p->image);
else else
container = gimp_image_get_channels (set->p->image); container = gimp_image_get_channels (set->p->image);
@ -220,7 +220,7 @@ gimp_item_list_dispose (GObject *object)
if (set->p->item_type == GIMP_TYPE_LAYER) if (set->p->item_type == GIMP_TYPE_LAYER)
container = gimp_image_get_layers (set->p->image); container = gimp_image_get_layers (set->p->image);
else if (set->p->item_type == GIMP_TYPE_VECTORS) else if (set->p->item_type == GIMP_TYPE_PATH)
container = gimp_image_get_paths (set->p->image); container = gimp_image_get_paths (set->p->image);
else else
container = gimp_image_get_channels (set->p->image); container = gimp_image_get_channels (set->p->image);
@ -349,7 +349,7 @@ gimp_item_list_named_new (GimpImage *image,
{ {
if (item_type == GIMP_TYPE_LAYER) if (item_type == GIMP_TYPE_LAYER)
items = gimp_image_get_selected_layers (image); items = gimp_image_get_selected_layers (image);
else if (item_type == GIMP_TYPE_VECTORS) else if (item_type == GIMP_TYPE_PATH)
items = gimp_image_get_selected_paths (image); items = gimp_image_get_selected_paths (image);
else if (item_type == GIMP_TYPE_CHANNEL) else if (item_type == GIMP_TYPE_CHANNEL)
items = gimp_image_get_selected_channels (image); items = gimp_image_get_selected_channels (image);

View file

@ -40,7 +40,7 @@
#include "text/gimpfont.h" #include "text/gimpfont.h"
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
/* /*

View file

@ -27,7 +27,7 @@
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "item-options-dialog.h" #include "item-options-dialog.h"
#include "vectors-options-dialog.h" #include "vectors-options-dialog.h"
@ -64,7 +64,7 @@ static void vectors_options_dialog_callback (GtkWidget *dialog,
GtkWidget * GtkWidget *
vectors_options_dialog_new (GimpImage *image, vectors_options_dialog_new (GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
GtkWidget *parent, GtkWidget *parent,
const gchar *title, const gchar *title,
@ -85,7 +85,7 @@ vectors_options_dialog_new (GimpImage *image,
GtkWidget *dialog; GtkWidget *dialog;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (vectors == NULL || GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (vectors == NULL || GIMP_IS_PATH (vectors), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL); g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL); g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
g_return_val_if_fail (title != NULL, NULL); g_return_val_if_fail (title != NULL, NULL);
@ -149,7 +149,7 @@ vectors_options_dialog_callback (GtkWidget *dialog,
private->callback (dialog, private->callback (dialog,
image, image,
GIMP_VECTORS (item), GIMP_PATH (item),
context, context,
item_name, item_name,
item_visible, item_visible,

View file

@ -21,7 +21,7 @@
typedef void (* GimpVectorsOptionsCallback) (GtkWidget *dialog, typedef void (* GimpVectorsOptionsCallback) (GtkWidget *dialog,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
const gchar *vectors_name, const gchar *vectors_name,
gboolean vectors_visible, gboolean vectors_visible,
@ -33,7 +33,7 @@ typedef void (* GimpVectorsOptionsCallback) (GtkWidget *dialog,
GtkWidget * vectors_options_dialog_new (GimpImage *image, GtkWidget * vectors_options_dialog_new (GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GimpContext *context, GimpContext *context,
GtkWidget *parent, GtkWidget *parent,
const gchar *title, const gchar *title,

View file

@ -31,7 +31,7 @@
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimpcanvasitem.h" #include "gimpcanvasitem.h"
#include "gimpcanvasitem-utils.h" #include "gimpcanvasitem-utils.h"
@ -105,7 +105,7 @@ gimp_canvas_item_on_handle (GimpCanvasItem *item,
gboolean gboolean
gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item, gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
GimpVectors *vectors, GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
gint width, gint width,
gint height, gint height,
@ -123,7 +123,7 @@ gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
gdouble mindist = -1; gdouble mindist = -1;
g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE); g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
g_return_val_if_fail (coord != NULL, FALSE); g_return_val_if_fail (coord != NULL, FALSE);
if (ret_anchor) *ret_anchor = NULL; if (ret_anchor) *ret_anchor = NULL;
@ -221,7 +221,7 @@ gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
gboolean gboolean
gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item, gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
GimpVectors *vectors, GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
gint width, gint width,
gint height, gint height,
@ -239,7 +239,7 @@ gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
gdouble min_dist, cur_dist, cur_pos; gdouble min_dist, cur_dist, cur_pos;
g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE); g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
g_return_val_if_fail (coord != NULL, FALSE); g_return_val_if_fail (coord != NULL, FALSE);
if (ret_coords) *ret_coords = *coord; if (ret_coords) *ret_coords = *coord;
@ -297,7 +297,7 @@ gimp_canvas_item_on_path (GimpCanvasItem *item,
GimpAnchor **ret_segment_start, GimpAnchor **ret_segment_start,
GimpAnchor **ret_segment_end, GimpAnchor **ret_segment_end,
GimpStroke **ret_stroke, GimpStroke **ret_stroke,
GimpVectors **ret_path) GimpPath **ret_path)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
GimpImage *image; GimpImage *image;
@ -321,7 +321,7 @@ gimp_canvas_item_on_path (GimpCanvasItem *item,
for (list = all_path; list; list = g_list_next (list)) for (list = all_path; list; list = g_list_next (list))
{ {
GimpVectors *vectors = list->data; GimpPath *vectors = list->data;
if (! gimp_item_get_visible (GIMP_ITEM (vectors))) if (! gimp_item_get_visible (GIMP_ITEM (vectors)))
continue; continue;

View file

@ -33,7 +33,7 @@ gboolean gimp_canvas_item_on_handle (GimpCanvasItem *item,
GimpHandleAnchor anchor); GimpHandleAnchor anchor);
gboolean gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item, gboolean gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
GimpVectors *vectors, GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
gint width, gint width,
gint height, gint height,
@ -42,7 +42,7 @@ gboolean gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
GimpAnchor **ret_anchor, GimpAnchor **ret_anchor,
GimpStroke **ret_stroke); GimpStroke **ret_stroke);
gboolean gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item, gboolean gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
GimpVectors *vectors, GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
gint width, gint width,
gint height, gint height,
@ -60,7 +60,7 @@ gboolean gimp_canvas_item_on_path (GimpCanvasItem *item,
GimpAnchor **ret_segment_start, GimpAnchor **ret_segment_start,
GimpAnchor **ret_segment_end, GimpAnchor **ret_segment_end,
GimpStroke **ret_stroke, GimpStroke **ret_stroke,
GimpVectors **ret_path); GimpPath **ret_path);
void gimp_canvas_item_shift_to_north_west (GimpHandleAnchor anchor, void gimp_canvas_item_shift_to_north_west (GimpHandleAnchor anchor,
gdouble x, gdouble x,

View file

@ -46,7 +46,7 @@
#include "text/gimptext.h" #include "text/gimptext.h"
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectors-import.h" #include "vectors/gimpvectors-import.h"
#include "widgets/gimpdnd.h" #include "widgets/gimpdnd.h"
@ -127,7 +127,7 @@ gimp_display_shell_dnd_init (GimpDisplayShell *shell)
gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_CHANNEL, gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_CHANNEL,
gimp_display_shell_drop_drawable, gimp_display_shell_drop_drawable,
shell); shell);
gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_VECTORS, gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_PATH,
gimp_display_shell_drop_path, gimp_display_shell_drop_path,
shell); shell);
gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_PATTERN, gimp_dnd_viewable_dest_add (shell->canvas, GIMP_TYPE_PATTERN,
@ -285,7 +285,7 @@ gimp_display_shell_drop_path (GtkWidget *widget,
if (new_item) if (new_item)
{ {
GimpVectors *new_path = GIMP_VECTORS (new_item); GimpPath *new_path = GIMP_PATH (new_item);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Drop New Path")); _("Drop New Path"));

View file

@ -44,7 +44,7 @@
#include "core/gimpsamplepoint.h" #include "core/gimpsamplepoint.h"
#include "core/gimptreehandler.h" #include "core/gimptreehandler.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
@ -139,17 +139,17 @@ static void gimp_display_shell_exported_handler (GimpImage *i
static void gimp_display_shell_active_paths_handler (GimpImage *image, static void gimp_display_shell_active_paths_handler (GimpImage *image,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_path_freeze_handler (GimpVectors *path, static void gimp_display_shell_path_freeze_handler (GimpPath *path,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_path_thaw_handler (GimpVectors *path, static void gimp_display_shell_path_thaw_handler (GimpPath *path,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_path_visible_handler (GimpVectors *path, static void gimp_display_shell_path_visible_handler (GimpPath *path,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_path_add_handler (GimpContainer *container, static void gimp_display_shell_path_add_handler (GimpContainer *container,
GimpVectors *path, GimpPath *path,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_path_remove_handler (GimpContainer *container, static void gimp_display_shell_path_remove_handler (GimpContainer *container,
GimpVectors *path, GimpPath *path,
GimpDisplayShell *shell); GimpDisplayShell *shell);
static void gimp_display_shell_check_notify_handler (GObject *config, static void gimp_display_shell_check_notify_handler (GObject *config,
@ -974,7 +974,7 @@ gimp_display_shell_active_paths_handler (GimpImage *image,
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {
GimpVectors *path = list->data; GimpPath *path = list->data;
GimpCanvasItem *item; GimpCanvasItem *item;
item = gimp_canvas_proxy_group_get_item (group, path); item = gimp_canvas_proxy_group_get_item (group, path);
@ -985,14 +985,14 @@ gimp_display_shell_active_paths_handler (GimpImage *image,
} }
static void static void
gimp_display_shell_path_freeze_handler (GimpVectors *path, gimp_display_shell_path_freeze_handler (GimpPath *path,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
/* do nothing */ /* do nothing */
} }
static void static void
gimp_display_shell_path_thaw_handler (GimpVectors *path, gimp_display_shell_path_thaw_handler (GimpPath *path,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors); GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
@ -1004,7 +1004,7 @@ gimp_display_shell_path_thaw_handler (GimpVectors *path,
} }
static void static void
gimp_display_shell_path_visible_handler (GimpVectors *path, gimp_display_shell_path_visible_handler (GimpPath *path,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors); GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
@ -1018,7 +1018,7 @@ gimp_display_shell_path_visible_handler (GimpVectors *path,
static void static void
gimp_display_shell_path_add_handler (GimpContainer *container, gimp_display_shell_path_add_handler (GimpContainer *container,
GimpVectors *path, GimpPath *path,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors); GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
@ -1038,7 +1038,7 @@ gimp_display_shell_path_add_handler (GimpContainer *container,
static void static void
gimp_display_shell_path_remove_handler (GimpContainer *container, gimp_display_shell_path_remove_handler (GimpContainer *container,
GimpVectors *path, GimpPath *path,
GimpDisplayShell *shell) GimpDisplayShell *shell)
{ {
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors); GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);

View file

@ -38,7 +38,7 @@
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockcontainer.h" #include "widgets/gimpdockcontainer.h"
@ -103,7 +103,7 @@ enum
struct _GimpToolPathPrivate struct _GimpToolPathPrivate
{ {
GimpVectors *vectors; /* the current Vector data */ GimpPath *vectors; /* the current Path data */
GimpVectorMode edit_mode; GimpVectorMode edit_mode;
gboolean polygonal; gboolean polygonal;
@ -197,11 +197,11 @@ static void gimp_tool_path_begin_change (GimpToolPath *path,
static void gimp_tool_path_end_change (GimpToolPath *path, static void gimp_tool_path_end_change (GimpToolPath *path,
gboolean success); gboolean success);
static void gimp_tool_path_vectors_visible (GimpVectors *vectors, static void gimp_tool_path_vectors_visible (GimpPath *vectors,
GimpToolPath *path); GimpToolPath *path);
static void gimp_tool_path_vectors_freeze (GimpVectors *vectors, static void gimp_tool_path_vectors_freeze (GimpPath *vectors,
GimpToolPath *path); GimpToolPath *path);
static void gimp_tool_path_vectors_thaw (GimpVectors *vectors, static void gimp_tool_path_vectors_thaw (GimpPath *vectors,
GimpToolPath *path); GimpToolPath *path);
static void gimp_tool_path_verify_state (GimpToolPath *path); static void gimp_tool_path_verify_state (GimpToolPath *path);
@ -271,7 +271,7 @@ gimp_tool_path_class_init (GimpToolPathClass *klass)
g_object_class_install_property (object_class, PROP_VECTORS, g_object_class_install_property (object_class, PROP_VECTORS,
g_param_spec_object ("vectors", NULL, NULL, g_param_spec_object ("vectors", NULL, NULL,
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
@ -389,7 +389,7 @@ gimp_tool_path_changed (GimpToolWidget *widget)
{ {
GimpToolPath *path = GIMP_TOOL_PATH (widget); GimpToolPath *path = GIMP_TOOL_PATH (widget);
GimpToolPathPrivate *private = path->private; GimpToolPathPrivate *private = path->private;
GimpVectors *vectors = private->vectors; GimpPath *vectors = private->vectors;
if (private->items) if (private->items)
{ {
@ -591,7 +591,7 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
if (private->function == VECTORS_SELECT_VECTOR) if (private->function == VECTORS_SELECT_VECTOR)
{ {
GimpVectors *vectors; GimpPath *vectors;
if (gimp_canvas_item_on_path (private->path, if (gimp_canvas_item_on_path (private->path,
coords, coords,
@ -612,7 +612,7 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
{ {
GimpDisplayShell *shell = gimp_tool_widget_get_shell (widget); GimpDisplayShell *shell = gimp_tool_widget_get_shell (widget);
GimpImage *image = gimp_display_get_image (shell->display); GimpImage *image = gimp_display_get_image (shell->display);
GimpVectors *vectors; GimpPath *vectors;
vectors = gimp_vectors_new (image, _("Unnamed")); vectors = gimp_vectors_new (image, _("Unnamed"));
g_object_ref_sink (vectors); g_object_ref_sink (vectors);
@ -1733,7 +1733,7 @@ gimp_tool_path_end_change (GimpToolPath *path,
} }
static void static void
gimp_tool_path_vectors_visible (GimpVectors *vectors, gimp_tool_path_vectors_visible (GimpPath *vectors,
GimpToolPath *path) GimpToolPath *path)
{ {
GimpToolPathPrivate *private = path->private; GimpToolPathPrivate *private = path->private;
@ -1743,13 +1743,13 @@ gimp_tool_path_vectors_visible (GimpVectors *vectors,
} }
static void static void
gimp_tool_path_vectors_freeze (GimpVectors *vectors, gimp_tool_path_vectors_freeze (GimpPath *vectors,
GimpToolPath *path) GimpToolPath *path)
{ {
} }
static void static void
gimp_tool_path_vectors_thaw (GimpVectors *vectors, gimp_tool_path_vectors_thaw (GimpPath *vectors,
GimpToolPath *path) GimpToolPath *path)
{ {
/* Ok, the vector might have changed externally (e.g. Undo) we need /* Ok, the vector might have changed externally (e.g. Undo) we need
@ -1937,12 +1937,12 @@ gimp_tool_path_new (GimpDisplayShell *shell)
void void
gimp_tool_path_set_vectors (GimpToolPath *path, gimp_tool_path_set_vectors (GimpToolPath *path,
GimpVectors *vectors) GimpPath *vectors)
{ {
GimpToolPathPrivate *private; GimpToolPathPrivate *private;
g_return_if_fail (GIMP_IS_TOOL_PATH (path)); g_return_if_fail (GIMP_IS_TOOL_PATH (path));
g_return_if_fail (vectors == NULL || GIMP_IS_VECTORS (vectors)); g_return_if_fail (vectors == NULL || GIMP_IS_PATH (vectors));
private = path->private; private = path->private;

View file

@ -62,7 +62,7 @@ GType gimp_tool_path_get_type (void) G_GNUC_CONST;
GimpToolWidget * gimp_tool_path_new (GimpDisplayShell *shell); GimpToolWidget * gimp_tool_path_new (GimpDisplayShell *shell);
void gimp_tool_path_set_vectors (GimpToolPath *path, void gimp_tool_path_set_vectors (GimpToolPath *path,
GimpVectors *vectors); GimpPath *vectors);
void gimp_tool_path_get_popup_state (GimpToolPath *path, void gimp_tool_path_get_popup_state (GimpToolPath *path,
gboolean *on_handle, gboolean *on_handle,

View file

@ -486,6 +486,7 @@ EXPORTS
gimp_parameters_append gimp_parameters_append
gimp_parameters_append_valist gimp_parameters_append_valist
gimp_parameters_free gimp_parameters_free
gimp_path_get_type
gimp_pattern_get_standard gimp_pattern_get_standard
gimp_pattern_get_type gimp_pattern_get_type
gimp_pencil_options_get_type gimp_pencil_options_get_type
@ -574,7 +575,6 @@ EXPORTS
gimp_vectors_export_file gimp_vectors_export_file
gimp_vectors_export_string gimp_vectors_export_string
gimp_vectors_freeze gimp_vectors_freeze
gimp_vectors_get_type
gimp_vectors_import_buffer gimp_vectors_import_buffer
gimp_vectors_import_file gimp_vectors_import_file
gimp_vectors_new gimp_vectors_new
@ -897,65 +897,65 @@ gimp_gegl_init
gimp_image_get_guides gimp_image_get_guides
gimp_image_get_sample_points gimp_image_get_sample_points
gimp_plug_in_manager_get_menu_branches gimp_plug_in_manager_get_menu_branches
desaturate_region desaturate_region
file_utils_filename_is_uri file_utils_filename_is_uri
get_pid get_pid
gimp_brightness_contrast_config_get_type gimp_brightness_contrast_config_get_type
gimp_brightness_contrast_config_set_node gimp_brightness_contrast_config_set_node
gimp_brightness_contrast_config_to_levels_config gimp_brightness_contrast_config_to_levels_config
gimp_buffer_get_tiles gimp_buffer_get_tiles
gimp_color_balance_config_get_type gimp_color_balance_config_get_type
gimp_color_balance_config_reset_range gimp_color_balance_config_reset_range
gimp_color_balance_config_to_cruft gimp_color_balance_config_to_cruft
gimp_colorize_config_get_type gimp_colorize_config_get_type
gimp_colorize_config_to_cruft gimp_colorize_config_to_cruft
gimp_container_get_first_child gimp_container_get_first_child
gimp_context_display_changed gimp_context_display_changed
gimp_curve_get_curve_type gimp_curve_get_curve_type
gimp_curve_get_n_points gimp_curve_get_n_points
gimp_curve_get_n_samples gimp_curve_get_n_samples
gimp_curve_get_point gimp_curve_get_point
gimp_curve_map_value gimp_curve_map_value
gimp_curves_config_get_type gimp_curves_config_get_type
gimp_curves_config_load_cruft gimp_curves_config_load_cruft
gimp_curves_config_save_cruft gimp_curves_config_save_cruft
gimp_curves_config_to_cruft gimp_curves_config_to_cruft
gimp_desaturate_config_get_type gimp_desaturate_config_get_type
gimp_display_options_no_image_get_type gimp_display_options_no_image_get_type
gimp_histogram_duplicate gimp_histogram_duplicate
gimp_histogram_ref gimp_histogram_ref
gimp_histogram_unref gimp_histogram_unref
gimp_hue_saturation_config_get_type gimp_hue_saturation_config_get_type
gimp_hue_saturation_config_reset_range gimp_hue_saturation_config_reset_range
gimp_hue_saturation_config_to_cruft gimp_hue_saturation_config_to_cruft
gimp_image_get_projection gimp_image_get_projection
gimp_image_map_config_compare gimp_image_map_config_compare
gimp_image_map_config_get_type gimp_image_map_config_get_type
gimp_imagefile_set_mime_type gimp_imagefile_set_mime_type
gimp_is_restored gimp_is_restored
gimp_item_is_attached gimp_item_is_attached
gimp_layer_new_from_tiles gimp_layer_new_from_tiles
gimp_levels_config_adjust_by_colors gimp_levels_config_adjust_by_colors
gimp_levels_config_get_type gimp_levels_config_get_type
gimp_levels_config_load_cruft gimp_levels_config_load_cruft
gimp_levels_config_reset_channel gimp_levels_config_reset_channel
gimp_levels_config_save_cruft gimp_levels_config_save_cruft
gimp_levels_config_stretch gimp_levels_config_stretch
gimp_levels_config_to_cruft gimp_levels_config_to_cruft
gimp_levels_config_to_curves_config gimp_levels_config_to_curves_config
gimp_list_set_sort_func gimp_list_set_sort_func
gimp_marshal_BOOLEAN__STRING gimp_marshal_BOOLEAN__STRING
gimp_marshal_VOID__DOUBLE gimp_marshal_VOID__DOUBLE
gimp_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE gimp_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE
gimp_operation_hue_saturation_map gimp_operation_hue_saturation_map
gimp_operation_levels_map_input gimp_operation_levels_map_input
gimp_perspective_clone_set_transform gimp_perspective_clone_set_transform
gimp_posterize_config_get_type gimp_posterize_config_get_type
gimp_recent_list_load gimp_recent_list_load
gimp_scan_convert_compose_value gimp_scan_convert_compose_value
gimp_stroke_options_take_dash_pattern gimp_stroke_options_take_dash_pattern
gimp_threshold_config_get_type gimp_threshold_config_get_type
gimp_threshold_config_to_cruft gimp_threshold_config_to_cruft
gimp_tool_info_build_options_filename gimp_tool_info_build_options_filename
gimp_use_gegl gimp_use_gegl
gimp_vectors_make_bezier gimp_vectors_make_bezier

View file

@ -29,8 +29,8 @@
#include "core/gimperror.h" #include "core/gimperror.h"
#include "core/gimpcoords.h" #include "core/gimpcoords.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "gimppaintcore.h" #include "gimppaintcore.h"
#include "gimppaintcore-stroke.h" #include "gimppaintcore-stroke.h"
@ -234,7 +234,7 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable, GimpDrawable *drawable,
GimpPaintOptions *paint_options, GimpPaintOptions *paint_options,
gboolean emulate_dynamics, gboolean emulate_dynamics,
GimpVectors *vectors, GimpPath *path,
gboolean push_undo, gboolean push_undo,
GError **error) GError **error)
{ {
@ -248,14 +248,14 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), FALSE); g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (GIMP_IS_PATH (path), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
gimp_item_get_offset (GIMP_ITEM (vectors), &off_x, &off_y); gimp_item_get_offset (GIMP_ITEM (path), &off_x, &off_y);
drawables = g_list_prepend (NULL, drawable); drawables = g_list_prepend (NULL, drawable);
for (stroke = vectors->strokes->head; for (stroke = path->strokes->head;
stroke; stroke;
stroke = stroke->next) stroke = stroke->next)
{ {

View file

@ -40,7 +40,7 @@ gboolean gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable, GimpDrawable *drawable,
GimpPaintOptions *paint_options, GimpPaintOptions *paint_options,
gboolean emulate_dynamics, gboolean emulate_dynamics,
GimpVectors *vectors, GimpPath *path,
gboolean push_undo, gboolean push_undo,
GError **error); GError **error);

View file

@ -46,7 +46,7 @@
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "text/gimpfont.h" #include "text/gimpfont.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimppdb-utils.h" #include "gimppdb-utils.h"
#include "gimppdberror.h" #include "gimppdberror.h"
@ -789,14 +789,14 @@ gimp_pdb_image_get_sample_point (GimpImage *image,
} }
GimpStroke * GimpStroke *
gimp_pdb_get_path_stroke (GimpVectors *path, gimp_pdb_get_path_stroke (GimpPath *path,
gint stroke_id, gint stroke_id,
GimpPDBItemModify modify, GimpPDBItemModify modify,
GError **error) GError **error)
{ {
GimpStroke *stroke = NULL; GimpStroke *stroke = NULL;
g_return_val_if_fail (GIMP_IS_VECTORS (path), NULL); g_return_val_if_fail (GIMP_IS_PATH (path), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
if (! gimp_pdb_item_is_not_group (GIMP_ITEM (path), error)) if (! gimp_pdb_item_is_not_group (GIMP_ITEM (path), error))

View file

@ -102,7 +102,7 @@ GimpSamplePoint * gimp_pdb_image_get_sample_point (GimpImage *image,
gint sample_point_id, gint sample_point_id,
GError **error); GError **error);
GimpStroke * gimp_pdb_get_path_stroke (GimpVectors *path, GimpStroke * gimp_pdb_get_path_stroke (GimpPath *path,
gint stroke_id, gint stroke_id,
GimpPDBItemModify modify, GimpPDBItemModify modify,
GError **error); GError **error);

View file

@ -35,7 +35,7 @@
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimppdbcontext.h" #include "gimppdbcontext.h"
#include "gimppdberror.h" #include "gimppdberror.h"

View file

@ -61,7 +61,7 @@
#include "plug-in/gimpplugin-cleanup.h" #include "plug-in/gimpplugin-cleanup.h"
#include "plug-in/gimpplugin.h" #include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimppdb.h" #include "gimppdb.h"
#include "gimppdberror.h" #include "gimppdberror.h"
@ -520,7 +520,7 @@ image_get_paths_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
gint num_paths = 0; gint num_paths = 0;
GimpVectors **paths = NULL; GimpPath **paths = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -534,7 +534,7 @@ image_get_paths_invoker (GimpProcedure *procedure,
{ {
gint i; gint i;
paths = g_new (GimpVectors *, num_paths); paths = g_new (GimpPath *, num_paths);
for (i = 0; i < num_paths; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
paths[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
@ -547,7 +547,7 @@ image_get_paths_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_PATH, (GObject **) paths, num_paths);
} }
return return_vals; return return_vals;
@ -1045,8 +1045,8 @@ image_insert_path_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
GimpVectors *path; GimpPath *path;
GimpVectors *parent; GimpPath *parent;
gint position; gint position;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -1087,7 +1087,7 @@ image_remove_path_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
GimpVectors *path; GimpPath *path;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
path = g_value_get_object (gimp_value_array_index (args, 1)); path = g_value_get_object (gimp_value_array_index (args, 1));
@ -1913,7 +1913,7 @@ image_get_selected_paths_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
gint num_paths = 0; gint num_paths = 0;
GimpVectors **paths = NULL; GimpPath **paths = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -1927,7 +1927,7 @@ image_get_selected_paths_invoker (GimpProcedure *procedure,
{ {
gint i; gint i;
paths = g_new (GimpVectors *, num_paths); paths = g_new (GimpPath *, num_paths);
for (i = 0; i < num_paths; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
paths[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
@ -1940,7 +1940,7 @@ image_get_selected_paths_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_PATH, (GObject **) paths, num_paths);
} }
return return_vals; return return_vals;
@ -1957,11 +1957,11 @@ image_set_selected_paths_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
gint num_paths; gint num_paths;
const GimpVectors **paths; const GimpPath **paths;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
num_paths = g_value_get_int (gimp_value_array_index (args, 1)); num_paths = g_value_get_int (gimp_value_array_index (args, 1));
paths = (const GimpVectors **) gimp_value_get_object_array (gimp_value_array_index (args, 2)); paths = (const GimpPath **) gimp_value_get_object_array (gimp_value_array_index (args, 2));
if (success) if (success)
{ {
@ -2650,7 +2650,7 @@ image_get_path_by_tattoo_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
guint tattoo; guint tattoo;
GimpVectors *path = NULL; GimpPath *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1)); tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
@ -2743,7 +2743,7 @@ image_get_path_by_name_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
const gchar *name; const gchar *name;
GimpVectors *path = NULL; GimpPath *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1)); name = g_value_get_string (gimp_value_array_index (args, 1));
@ -3381,7 +3381,7 @@ register_image_procs (GimpPDB *pdb)
gimp_param_spec_object_array ("paths", gimp_param_spec_object_array ("paths",
"paths", "paths",
"The list of paths contained in the image.", "The list of paths contained in the image.",
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -3843,17 +3843,17 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path", "The path",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("parent", gimp_param_spec_path ("parent",
"parent", "parent",
"The parent path", "The parent path",
TRUE, TRUE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("position", g_param_spec_int ("position",
"position", "position",
@ -3884,11 +3884,11 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -4673,7 +4673,7 @@ register_image_procs (GimpPDB *pdb)
gimp_param_spec_object_array ("paths", gimp_param_spec_object_array ("paths",
"paths", "paths",
"The list of selected paths in the image.", "The list of selected paths in the image.",
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -4708,7 +4708,7 @@ register_image_procs (GimpPDB *pdb)
gimp_param_spec_object_array ("paths", gimp_param_spec_object_array ("paths",
"paths", "paths",
"The list of paths to select", "The list of paths to select",
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -5385,11 +5385,11 @@ register_image_procs (GimpPDB *pdb)
1, G_MAXUINT32, 1, 1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path with the specified tattoo", "The path with the specified tattoo",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -5493,11 +5493,11 @@ register_image_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path with the specified name", "The path with the specified name",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -39,7 +39,7 @@
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimpselection.h" #include "core/gimpselection.h"
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimppdb.h" #include "gimppdb.h"
#include "gimppdb-utils.h" #include "gimppdb-utils.h"
@ -293,7 +293,7 @@ item_id_is_path_invoker (GimpProcedure *procedure,
{ {
GimpItem *item = gimp_item_get_by_id (gimp, item_id); GimpItem *item = gimp_item_get_by_id (gimp, item_id);
path = (GIMP_IS_VECTORS (item) && path = (GIMP_IS_PATH (item) &&
! gimp_item_is_removed (item)); ! gimp_item_is_removed (item));
} }

View file

@ -40,10 +40,10 @@
#include "text/gimptextlayer.h" #include "text/gimptextlayer.h"
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke-new.h" #include "vectors/gimpstroke-new.h"
#include "vectors/gimpvectors-export.h" #include "vectors/gimpvectors-export.h"
#include "vectors/gimpvectors-import.h" #include "vectors/gimpvectors-import.h"
#include "vectors/gimpvectors.h"
#include "gimppdb.h" #include "gimppdb.h"
#include "gimppdb-utils.h" #include "gimppdb-utils.h"
@ -65,7 +65,7 @@ path_new_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
const gchar *name; const gchar *name;
GimpVectors *path = NULL; GimpPath *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1)); name = g_value_get_string (gimp_value_array_index (args, 1));
@ -96,7 +96,7 @@ path_new_from_text_layer_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
GimpLayer *layer; GimpLayer *layer;
GimpVectors *path = NULL; GimpPath *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
layer = g_value_get_object (gimp_value_array_index (args, 1)); layer = g_value_get_object (gimp_value_array_index (args, 1));
@ -138,15 +138,15 @@ path_copy_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
GimpVectors *path_copy = NULL; GimpPath *path_copy = NULL;
path = g_value_get_object (gimp_value_array_index (args, 0)); path = g_value_get_object (gimp_value_array_index (args, 0));
if (success) if (success)
{ {
path_copy = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (path), path_copy = GIMP_PATH (gimp_item_duplicate (GIMP_ITEM (path),
G_TYPE_FROM_INSTANCE (path))); G_TYPE_FROM_INSTANCE (path)));
if (! path_copy) if (! path_copy)
success = FALSE; success = FALSE;
@ -171,7 +171,7 @@ path_get_strokes_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint num_strokes = 0; gint num_strokes = 0;
gint32 *stroke_ids = NULL; gint32 *stroke_ids = NULL;
@ -220,7 +220,7 @@ path_stroke_get_length_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble precision; gdouble precision;
gdouble length = 0.0; gdouble length = 0.0;
@ -258,7 +258,7 @@ path_stroke_get_point_at_dist_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble dist; gdouble dist;
gdouble precision; gdouble precision;
@ -312,7 +312,7 @@ path_remove_stroke_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
path = g_value_get_object (gimp_value_array_index (args, 0)); path = g_value_get_object (gimp_value_array_index (args, 0));
@ -349,7 +349,7 @@ path_stroke_close_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
path = g_value_get_object (gimp_value_array_index (args, 0)); path = g_value_get_object (gimp_value_array_index (args, 0));
@ -388,7 +388,7 @@ path_stroke_reverse_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
path = g_value_get_object (gimp_value_array_index (args, 0)); path = g_value_get_object (gimp_value_array_index (args, 0));
@ -427,7 +427,7 @@ path_stroke_translate_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble off_x; gdouble off_x;
gdouble off_y; gdouble off_y;
@ -472,7 +472,7 @@ path_stroke_scale_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble scale_x; gdouble scale_x;
gdouble scale_y; gdouble scale_y;
@ -517,7 +517,7 @@ path_stroke_rotate_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble center_x; gdouble center_x;
gdouble center_y; gdouble center_y;
@ -564,7 +564,7 @@ path_stroke_flip_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gint flip_type; gint flip_type;
gdouble axis; gdouble axis;
@ -609,7 +609,7 @@ path_stroke_flip_free_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble x1; gdouble x1;
gdouble y1; gdouble y1;
@ -659,7 +659,7 @@ path_stroke_get_points_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gint type = 0; gint type = 0;
gint num_points = 0; gint num_points = 0;
@ -727,7 +727,7 @@ path_stroke_new_from_points_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint type; gint type;
gint num_points; gint num_points;
const gdouble *controlpoints; const gdouble *controlpoints;
@ -799,7 +799,7 @@ path_stroke_interpolate_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble precision; gdouble precision;
gint num_coords = 0; gint num_coords = 0;
@ -864,7 +864,7 @@ path_bezier_stroke_new_moveto_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gdouble x0; gdouble x0;
gdouble y0; gdouble y0;
gint stroke_id = 0; gint stroke_id = 0;
@ -919,7 +919,7 @@ path_bezier_stroke_lineto_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble x0; gdouble x0;
gdouble y0; gdouble y0;
@ -967,7 +967,7 @@ path_bezier_stroke_conicto_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble x0; gdouble x0;
gdouble y0; gdouble y0;
@ -1023,7 +1023,7 @@ path_bezier_stroke_cubicto_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpVectors *path; GimpPath *path;
gint stroke_id; gint stroke_id;
gdouble x0; gdouble x0;
gdouble y0; gdouble y0;
@ -1088,7 +1088,7 @@ path_bezier_stroke_new_ellipse_invoker (GimpProcedure *procedure,
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path; GimpPath *path;
gdouble x0; gdouble x0;
gdouble y0; gdouble y0;
gdouble radius_x; gdouble radius_x;
@ -1155,7 +1155,7 @@ path_import_from_file_invoker (GimpProcedure *procedure,
gboolean merge; gboolean merge;
gboolean scale; gboolean scale;
gint num_paths = 0; gint num_paths = 0;
GimpVectors **path = NULL; GimpPath **path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
file = g_value_get_object (gimp_value_array_index (args, 1)); file = g_value_get_object (gimp_value_array_index (args, 1));
@ -1180,7 +1180,7 @@ path_import_from_file_invoker (GimpProcedure *procedure,
GList *list; GList *list;
gint i; gint i;
path = g_new (GimpVectors *, num_paths); path = g_new (GimpPath *, num_paths);
for (i = 0, list = path_list; for (i = 0, list = path_list;
i < num_paths; i < num_paths;
@ -1200,7 +1200,7 @@ path_import_from_file_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) path, num_paths); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_PATH, (GObject **) path, num_paths);
} }
return return_vals; return return_vals;
@ -1222,7 +1222,7 @@ path_import_from_string_invoker (GimpProcedure *procedure,
gboolean merge; gboolean merge;
gboolean scale; gboolean scale;
gint num_paths = 0; gint num_paths = 0;
GimpVectors **path = NULL; GimpPath **path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
string = g_value_get_string (gimp_value_array_index (args, 1)); string = g_value_get_string (gimp_value_array_index (args, 1));
@ -1248,7 +1248,7 @@ path_import_from_string_invoker (GimpProcedure *procedure,
GList *list; GList *list;
gint i; gint i;
path = g_new (GimpVectors *, num_paths); path = g_new (GimpPath *, num_paths);
for (i = 0, list = path_list; for (i = 0, list = path_list;
i < num_paths; i < num_paths;
@ -1268,7 +1268,7 @@ path_import_from_string_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) path, num_paths); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_PATH, (GObject **) path, num_paths);
} }
return return_vals; return return_vals;
@ -1285,7 +1285,7 @@ path_export_to_file_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
GFile *file; GFile *file;
GimpVectors *path; GimpPath *path;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
file = g_value_get_object (gimp_value_array_index (args, 1)); file = g_value_get_object (gimp_value_array_index (args, 1));
@ -1318,7 +1318,7 @@ path_export_to_string_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
GimpVectors *path; GimpPath *path;
gchar *string = NULL; gchar *string = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -1379,11 +1379,11 @@ register_path_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"the current path object, 0 if no path exists in the image.", "the current path object, 0 if no path exists in the image.",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -1414,11 +1414,11 @@ register_path_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path of the text layer.", "The path of the text layer.",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -1437,17 +1437,17 @@ register_path_procs (GimpPDB *pdb)
"Barak Itkin", "Barak Itkin",
"2008"); "2008");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object to copy", "The path object to copy",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("path-copy", gimp_param_spec_path ("path-copy",
"path copy", "path copy",
"The newly copied path object", "The newly copied path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -1466,11 +1466,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-strokes", g_param_spec_int ("num-strokes",
"num strokes", "num strokes",
@ -1500,11 +1500,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1541,11 +1541,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1606,11 +1606,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1635,11 +1635,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1664,11 +1664,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2020"); "2020");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1693,11 +1693,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1734,11 +1734,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1775,11 +1775,11 @@ register_path_procs (GimpPDB *pdb)
"Jo\xc3\xa3o S. O. Bueno", "Jo\xc3\xa3o S. O. Bueno",
"2006"); "2006");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1822,11 +1822,11 @@ register_path_procs (GimpPDB *pdb)
"Jo\xc3\xa3o S. O. Bueno", "Jo\xc3\xa3o S. O. Bueno",
"2006"); "2006");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1866,11 +1866,11 @@ register_path_procs (GimpPDB *pdb)
"Jo\xc3\xa3o S. O. Bueno", "Jo\xc3\xa3o S. O. Bueno",
"2006"); "2006");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1919,11 +1919,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2006"); "2006");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -1972,11 +1972,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2006"); "2006");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_enum ("type", g_param_spec_enum ("type",
"type", "type",
@ -2025,11 +2025,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -2077,11 +2077,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0", g_param_spec_double ("x0",
"x0", "x0",
@ -2118,11 +2118,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -2159,11 +2159,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -2212,11 +2212,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("stroke-id", g_param_spec_int ("stroke-id",
"stroke id", "stroke id",
@ -2277,11 +2277,11 @@ register_path_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2005"); "2005");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_double ("x0", g_param_spec_double ("x0",
"x0", "x0",
@ -2369,7 +2369,7 @@ register_path_procs (GimpPDB *pdb)
gimp_param_spec_object_array ("path", gimp_param_spec_object_array ("path",
"path", "path",
"The list of newly created path", "The list of newly created path",
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -2429,7 +2429,7 @@ register_path_procs (GimpPDB *pdb)
gimp_param_spec_object_array ("path", gimp_param_spec_object_array ("path",
"path", "path",
"The list of newly created path", "The list of newly created path",
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -2461,11 +2461,11 @@ register_path_procs (GimpPDB *pdb)
G_TYPE_FILE, G_TYPE_FILE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object to export, or %NULL for all in the image", "The path object to export, or %NULL for all in the image",
TRUE, TRUE,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -2490,11 +2490,11 @@ register_path_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("path", gimp_param_spec_path ("path",
"path", "path",
"The path object to export, or %NULL for all in the image", "The path object to export, or %NULL for all in the image",
TRUE, TRUE,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("string", gimp_param_spec_string ("string",
"string", "string",

View file

@ -49,7 +49,7 @@
#include "pdb/gimppdb-utils.h" #include "pdb/gimppdb-utils.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "libgimp/gimpgpparams.h" #include "libgimp/gimpgpparams.h"

View file

@ -57,7 +57,7 @@
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "plug-in/gimppluginmanager-file.h" #include "plug-in/gimppluginmanager-file.h"
@ -381,7 +381,7 @@ gimp_create_mainimage (Gimp *gimp,
GimpChannel *channel = NULL; GimpChannel *channel = NULL;
GeglColor *channel_color = gegl_color_new (NULL); GeglColor *channel_color = gegl_color_new (NULL);
GimpChannel *selection = NULL; GimpChannel *selection = NULL;
GimpVectors *vectors = NULL; GimpPath *vectors = NULL;
GimpCoords vectors1_coords[] = GIMP_MAINIMAGE_VECTORS1_COORDS; GimpCoords vectors1_coords[] = GIMP_MAINIMAGE_VECTORS1_COORDS;
GimpCoords vectors2_coords[] = GIMP_MAINIMAGE_VECTORS2_COORDS; GimpCoords vectors2_coords[] = GIMP_MAINIMAGE_VECTORS2_COORDS;
GimpStroke *stroke = NULL; GimpStroke *stroke = NULL;
@ -687,7 +687,7 @@ gimp_assert_vectors (GimpImage *image,
gsize coords_size, gsize coords_size,
gboolean visible) gboolean visible)
{ {
GimpVectors *vectors = NULL; GimpPath *vectors = NULL;
GimpStroke *stroke = NULL; GimpStroke *stroke = NULL;
GArray *control_points = NULL; GArray *control_points = NULL;
gboolean closed = FALSE; gboolean closed = FALSE;

View file

@ -29,9 +29,9 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpbezierstroke.h"
#include "vectors/gimppath.h"
#include "gimptext.h" #include "gimptext.h"
#include "gimptext-vectors.h" #include "gimptext-vectors.h"
@ -41,7 +41,7 @@
typedef struct typedef struct
{ {
GimpVectors *vectors; GimpPath *vectors;
GimpStroke *stroke; GimpStroke *stroke;
GimpAnchor *anchor; GimpAnchor *anchor;
} RenderContext; } RenderContext;
@ -51,11 +51,11 @@ static void gimp_text_render_vectors (cairo_t *cr,
RenderContext *context); RenderContext *context);
GimpVectors * GimpPath *
gimp_text_vectors_new (GimpImage *image, gimp_text_vectors_new (GimpImage *image,
GimpText *text) GimpText *text)
{ {
GimpVectors *vectors; GimpPath *vectors;
RenderContext context = { NULL, }; RenderContext context = { NULL, };
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);

View file

@ -22,8 +22,8 @@
#define __GIMP_TEXT_VECTORS_H__ #define __GIMP_TEXT_VECTORS_H__
GimpVectors * gimp_text_vectors_new (GimpImage *image, GimpPath * gimp_text_vectors_new (GimpImage *image,
GimpText *text); GimpText *text);
#endif /* __GIMP_TEXT_VECTORS_H__ */ #endif /* __GIMP_TEXT_VECTORS_H__ */

View file

@ -32,7 +32,7 @@
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimppivotselector.h" #include "widgets/gimppivotselector.h"
#include "widgets/gimppropwidgets.h" #include "widgets/gimppropwidgets.h"
@ -824,7 +824,7 @@ gimp_align_options_update_area (GimpAlignOptions *options)
else if (GIMP_IS_CHANNEL (options->priv->reference)) else if (GIMP_IS_CHANNEL (options->priv->reference))
tmp_txt = g_strdup_printf (_("Reference channel: %s"), tmp_txt = g_strdup_printf (_("Reference channel: %s"),
gimp_object_get_name (options->priv->reference)); gimp_object_get_name (options->priv->reference));
else if (GIMP_IS_VECTORS (options->priv->reference)) else if (GIMP_IS_PATH (options->priv->reference))
tmp_txt = g_strdup_printf (_("Reference path: %s"), tmp_txt = g_strdup_printf (_("Reference path: %s"),
gimp_object_get_name (options->priv->reference)); gimp_object_get_name (options->priv->reference));
else if (GIMP_IS_GUIDE (options->priv->reference)) else if (GIMP_IS_GUIDE (options->priv->reference))

View file

@ -38,7 +38,7 @@
#include "core/gimppickable.h" #include "core/gimppickable.h"
#include "core/gimppickable-auto-shrink.h" #include "core/gimppickable-auto-shrink.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
@ -342,7 +342,7 @@ gimp_align_tool_button_release (GimpTool *tool,
if (object == NULL) if (object == NULL)
{ {
GimpVectors *vectors; GimpPath *path;
GimpGuide *guide; GimpGuide *guide;
GimpLayer *layer; GimpLayer *layer;
GObject *previously_picked; GObject *previously_picked;
@ -351,12 +351,12 @@ gimp_align_tool_button_release (GimpTool *tool,
previously_picked = gimp_align_options_get_reference (options, FALSE); previously_picked = gimp_align_options_get_reference (options, FALSE);
if ((vectors = gimp_image_pick_path (image, if ((path = gimp_image_pick_path (image,
coords->x, coords->y, coords->x, coords->y,
FUNSCALEX (shell, snap_distance), FUNSCALEX (shell, snap_distance),
FUNSCALEY (shell, snap_distance)))) FUNSCALEY (shell, snap_distance))))
{ {
object = G_OBJECT (vectors); object = G_OBJECT (path);
} }
else if (gimp_display_shell_get_show_guides (shell) && else if (gimp_display_shell_get_show_guides (shell) &&
(guide = gimp_image_pick_guide (image, (guide = gimp_image_pick_guide (image,

View file

@ -71,7 +71,7 @@ struct _GimpAlignToolClass
void gimp_align_tool_register (GimpToolRegisterCallback callback, void gimp_align_tool_register (GimpToolRegisterCallback callback,
gpointer data); gpointer data);
GType gimp_align_tool_get_type (void) G_GNUC_CONST; GType gimp_align_tool_get_type (void) G_GNUC_CONST;

View file

@ -203,7 +203,7 @@ gimp_move_tool_button_press (GimpTool *tool,
if (options->move_type == GIMP_TRANSFORM_TYPE_PATH) if (options->move_type == GIMP_TRANSFORM_TYPE_PATH)
{ {
GimpVectors *vectors; GimpPath *vectors;
vectors = gimp_image_pick_path (image, vectors = gimp_image_pick_path (image,
coords->x, coords->y, coords->x, coords->y,

View file

@ -57,7 +57,7 @@
#include "text/gimptextundo.h" #include "text/gimptextundo.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectors-warp.h" #include "vectors/gimpvectors-warp.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
@ -2313,7 +2313,7 @@ gimp_text_tool_paste_clipboard (GimpTextTool *text_tool)
void void
gimp_text_tool_create_vectors (GimpTextTool *text_tool) gimp_text_tool_create_vectors (GimpTextTool *text_tool)
{ {
GimpVectors *path; GimpPath *path;
g_return_if_fail (GIMP_IS_TEXT_TOOL (text_tool)); g_return_if_fail (GIMP_IS_TEXT_TOOL (text_tool));
@ -2341,7 +2341,7 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
GError **error) GError **error)
{ {
GList *vectors0; GList *vectors0;
GimpVectors *vectors; GimpPath *vectors;
gdouble box_width; gdouble box_width;
gdouble box_height; gdouble box_height;
GimpTextDirection dir; GimpTextDirection dir;

View file

@ -28,7 +28,7 @@
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimpcontainerview.h" #include "widgets/gimpcontainerview.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
@ -58,7 +58,7 @@ gimp_tools_blink_lock_box (Gimp *gimp,
identifier = "gimp-layer-list"; identifier = "gimp-layer-list";
else if (GIMP_IS_CHANNEL (item)) else if (GIMP_IS_CHANNEL (item))
identifier = "gimp-channel-list"; identifier = "gimp-channel-list";
else if (GIMP_IS_VECTORS (item)) else if (GIMP_IS_PATH (item))
identifier = "gimp-vectors-list"; identifier = "gimp-vectors-list";
else else
return; return;

View file

@ -50,8 +50,8 @@
#include "core/gimptoolinfo.h" #include "core/gimptoolinfo.h"
#include "core/gimpviewable.h" #include "core/gimpviewable.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimppath.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
@ -832,8 +832,8 @@ gimp_transform_grid_tool_draw (GimpDrawTool *draw_tool)
for (iter = gimp_image_get_selected_paths (image); iter; iter = iter->next) for (iter = gimp_image_get_selected_paths (image); iter; iter = iter->next)
{ {
GimpVectors *path = iter->data; GimpPath *path = iter->data;
GimpStroke *stroke = NULL; GimpStroke *stroke = NULL;
while ((stroke = gimp_vectors_stroke_get_next (path, stroke))) while ((stroke = gimp_vectors_stroke_get_next (path, stroke)))
{ {

View file

@ -39,7 +39,7 @@
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "core/gimp-transform-resize.h" #include "core/gimp-transform-resize.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell.h"
@ -749,7 +749,7 @@ gimp_transform_tool_check_selected_objects (GimpTransformTool *tr_tool,
locked_message = _("The selected path's strokes are locked."); locked_message = _("The selected path's strokes are locked.");
else if (gimp_item_is_position_locked (item, &locked_item)) else if (gimp_item_is_position_locked (item, &locked_item))
locked_message = _("The selected path's position is locked."); locked_message = _("The selected path's position is locked.");
else if (! gimp_vectors_get_n_strokes (GIMP_VECTORS (item))) else if (! gimp_vectors_get_n_strokes (GIMP_PATH (item)))
locked_message = _("The selected path has no strokes."); locked_message = _("The selected path has no strokes.");
} }
break; break;

View file

@ -40,7 +40,7 @@
#include "paint/gimppaintoptions.h" /* GIMP_PAINT_OPTIONS_CONTEXT_MASK */ #include "paint/gimppaintoptions.h" /* GIMP_PAINT_OPTIONS_CONTEXT_MASK */
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockcontainer.h" #include "widgets/gimpdockcontainer.h"
@ -121,7 +121,7 @@ static void gimp_vector_tool_path_activate (GimpToolWidget *path,
static void gimp_vector_tool_vectors_changed (GimpImage *image, static void gimp_vector_tool_vectors_changed (GimpImage *image,
GimpVectorTool *vector_tool); GimpVectorTool *vector_tool);
static void gimp_vector_tool_vectors_removed (GimpVectors *vectors, static void gimp_vector_tool_vectors_removed (GimpPath *vectors,
GimpVectorTool *vector_tool); GimpVectorTool *vector_tool);
static void gimp_vector_tool_to_selection (GimpVectorTool *vector_tool); static void gimp_vector_tool_to_selection (GimpVectorTool *vector_tool);
@ -450,7 +450,7 @@ gimp_vector_tool_path_changed (GimpToolWidget *path,
{ {
GimpDisplayShell *shell = gimp_tool_widget_get_shell (path); GimpDisplayShell *shell = gimp_tool_widget_get_shell (path);
GimpImage *image = gimp_display_get_image (shell->display); GimpImage *image = gimp_display_get_image (shell->display);
GimpVectors *vectors; GimpPath *vectors;
g_object_get (path, g_object_get (path,
"vectors", &vectors, "vectors", &vectors,
@ -532,7 +532,7 @@ static void
gimp_vector_tool_vectors_changed (GimpImage *image, gimp_vector_tool_vectors_changed (GimpImage *image,
GimpVectorTool *vector_tool) GimpVectorTool *vector_tool)
{ {
GimpVectors *path = NULL; GimpPath *path = NULL;
/* The path tool can only work on one path at a time. */ /* The path tool can only work on one path at a time. */
if (g_list_length (gimp_image_get_selected_paths (image)) == 1) if (g_list_length (gimp_image_get_selected_paths (image)) == 1)
@ -542,7 +542,7 @@ gimp_vector_tool_vectors_changed (GimpImage *image,
} }
static void static void
gimp_vector_tool_vectors_removed (GimpVectors *vectors, gimp_vector_tool_vectors_removed (GimpPath *vectors,
GimpVectorTool *vector_tool) GimpVectorTool *vector_tool)
{ {
gimp_vector_tool_set_vectors (vector_tool, NULL); gimp_vector_tool_set_vectors (vector_tool, NULL);
@ -550,14 +550,14 @@ gimp_vector_tool_vectors_removed (GimpVectors *vectors,
void void
gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool, gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
GimpVectors *vectors) GimpPath *vectors)
{ {
GimpTool *tool; GimpTool *tool;
GimpItem *item = NULL; GimpItem *item = NULL;
GimpVectorOptions *options; GimpVectorOptions *options;
g_return_if_fail (GIMP_IS_VECTOR_TOOL (vector_tool)); g_return_if_fail (GIMP_IS_VECTOR_TOOL (vector_tool));
g_return_if_fail (vectors == NULL || GIMP_IS_VECTORS (vectors)); g_return_if_fail (vectors == NULL || GIMP_IS_PATH (vectors));
tool = GIMP_TOOL (vector_tool); tool = GIMP_TOOL (vector_tool);
options = GIMP_VECTOR_TOOL_GET_OPTIONS (vector_tool); options = GIMP_VECTOR_TOOL_GET_OPTIONS (vector_tool);

View file

@ -42,7 +42,7 @@ struct _GimpVectorTool
{ {
GimpDrawTool parent_instance; GimpDrawTool parent_instance;
GimpVectors *vectors; /* the current Vector data */ GimpPath *vectors; /* the current Path data */
GimpVectorMode saved_mode; /* used by modifier_key() */ GimpVectorMode saved_mode; /* used by modifier_key() */
GimpToolWidget *widget; GimpToolWidget *widget;
@ -61,6 +61,6 @@ void gimp_vector_tool_register (GimpToolRegisterCallback callback,
GType gimp_vector_tool_get_type (void) G_GNUC_CONST; GType gimp_vector_tool_get_type (void) G_GNUC_CONST;
void gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool, void gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
GimpVectors *vectors); GimpPath *vectors);
#endif /* __GIMP_VECTOR_TOOL_H__ */ #endif /* __GIMP_VECTOR_TOOL_H__ */

View file

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program /* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* *
* gimpvectors.c * gimppath.c
* Copyright (C) 2002 Simon Budig <simon@gimp.org> * Copyright (C) 2002 Simon Budig <simon@gimp.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -47,8 +47,8 @@
#include "paint/gimppaintoptions.h" #include "paint/gimppaintoptions.h"
#include "gimpanchor.h" #include "gimpanchor.h"
#include "gimppath.h"
#include "gimpstroke.h" #include "gimpstroke.h"
#include "gimpvectors.h"
#include "gimpvectors-preview.h" #include "gimpvectors-preview.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -137,65 +137,65 @@ static void gimp_vectors_to_selection (GimpItem *item,
gdouble feather_radius_x, gdouble feather_radius_x,
gdouble feather_radius_y); gdouble feather_radius_y);
static void gimp_vectors_real_freeze (GimpVectors *vectors); static void gimp_vectors_real_freeze (GimpPath *vectors);
static void gimp_vectors_real_thaw (GimpVectors *vectors); static void gimp_vectors_real_thaw (GimpPath *vectors);
static void gimp_vectors_real_stroke_add (GimpVectors *vectors, static void gimp_vectors_real_stroke_add (GimpPath *vectors,
GimpStroke *stroke); GimpStroke *stroke);
static void gimp_vectors_real_stroke_remove (GimpVectors *vectors, static void gimp_vectors_real_stroke_remove (GimpPath *vectors,
GimpStroke *stroke); GimpStroke *stroke);
static GimpStroke * gimp_vectors_real_stroke_get (GimpVectors *vectors, static GimpStroke * gimp_vectors_real_stroke_get (GimpPath *vectors,
const GimpCoords *coord); const GimpCoords *coord);
static GimpStroke *gimp_vectors_real_stroke_get_next(GimpVectors *vectors, static GimpStroke *gimp_vectors_real_stroke_get_next(GimpPath *vectors,
GimpStroke *prev); GimpStroke *prev);
static gdouble gimp_vectors_real_stroke_get_length (GimpVectors *vectors, static gdouble gimp_vectors_real_stroke_get_length (GimpPath *vectors,
GimpStroke *prev); GimpStroke *prev);
static GimpAnchor * gimp_vectors_real_anchor_get (GimpVectors *vectors, static GimpAnchor * gimp_vectors_real_anchor_get (GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
GimpStroke **ret_stroke); GimpStroke **ret_stroke);
static void gimp_vectors_real_anchor_delete (GimpVectors *vectors, static void gimp_vectors_real_anchor_delete (GimpPath *vectors,
GimpAnchor *anchor); GimpAnchor *anchor);
static gdouble gimp_vectors_real_get_length (GimpVectors *vectors, static gdouble gimp_vectors_real_get_length (GimpPath *vectors,
const GimpAnchor *start); const GimpAnchor *start);
static gdouble gimp_vectors_real_get_distance (GimpVectors *vectors, static gdouble gimp_vectors_real_get_distance (GimpPath *vectors,
const GimpCoords *coord); const GimpCoords *coord);
static gint gimp_vectors_real_interpolate (GimpVectors *vectors, static gint gimp_vectors_real_interpolate (GimpPath *vectors,
GimpStroke *stroke, GimpStroke *stroke,
gdouble precision, gdouble precision,
gint max_points, gint max_points,
GimpCoords *ret_coords); GimpCoords *ret_coords);
static GimpBezierDesc * gimp_vectors_make_bezier (GimpVectors *vectors); static GimpBezierDesc * gimp_vectors_make_bezier (GimpPath *vectors);
static GimpBezierDesc * gimp_vectors_real_make_bezier (GimpVectors *vectors); static GimpBezierDesc * gimp_vectors_real_make_bezier (GimpPath *vectors);
G_DEFINE_TYPE (GimpVectors, gimp_vectors, GIMP_TYPE_ITEM) G_DEFINE_TYPE (GimpPath, gimp_path, GIMP_TYPE_ITEM)
#define parent_class gimp_vectors_parent_class #define parent_class gimp_path_parent_class
static guint gimp_vectors_signals[LAST_SIGNAL] = { 0 }; static guint gimp_path_signals[LAST_SIGNAL] = { 0 };
static void static void
gimp_vectors_class_init (GimpVectorsClass *klass) gimp_path_class_init (GimpPathClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass); GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass); GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
gimp_vectors_signals[FREEZE] = gimp_path_signals[FREEZE] =
g_signal_new ("freeze", g_signal_new ("freeze",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpVectorsClass, freeze), G_STRUCT_OFFSET (GimpPathClass, freeze),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
gimp_vectors_signals[THAW] = gimp_path_signals[THAW] =
g_signal_new ("thaw", g_signal_new ("thaw",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpVectorsClass, thaw), G_STRUCT_OFFSET (GimpPathClass, thaw),
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
@ -260,24 +260,24 @@ gimp_vectors_class_init (GimpVectorsClass *klass)
} }
static void static void
gimp_vectors_init (GimpVectors *vectors) gimp_path_init (GimpPath *path)
{ {
gimp_item_set_visible (GIMP_ITEM (vectors), FALSE, FALSE); gimp_item_set_visible (GIMP_ITEM (path), FALSE, FALSE);
vectors->strokes = g_queue_new (); path->strokes = g_queue_new ();
vectors->stroke_to_list = g_hash_table_new (g_direct_hash, g_direct_equal); path->stroke_to_list = g_hash_table_new (g_direct_hash, g_direct_equal);
vectors->last_stroke_id = 0; path->last_stroke_id = 0;
vectors->freeze_count = 0; path->freeze_count = 0;
vectors->precision = 0.2; path->precision = 0.2;
vectors->bezier_desc = NULL; path->bezier_desc = NULL;
vectors->bounds_valid = FALSE; path->bounds_valid = FALSE;
} }
static void static void
gimp_vectors_finalize (GObject *object) gimp_vectors_finalize (GObject *object)
{ {
GimpVectors *vectors = GIMP_VECTORS (object); GimpPath *vectors = GIMP_PATH (object);
if (vectors->bezier_desc) if (vectors->bezier_desc)
{ {
@ -304,11 +304,11 @@ static gint64
gimp_vectors_get_memsize (GimpObject *object, gimp_vectors_get_memsize (GimpObject *object,
gint64 *gui_size) gint64 *gui_size)
{ {
GimpVectors *vectors; GimpPath *vectors;
GList *list; GList *list;
gint64 memsize = 0; gint64 memsize = 0;
vectors = GIMP_VECTORS (object); vectors = GIMP_PATH (object);
for (list = vectors->strokes->head; list; list = g_list_next (list)) for (list = vectors->strokes->head; list; list = g_list_next (list))
memsize += (gimp_object_get_memsize (GIMP_OBJECT (list->data), gui_size) + memsize += (gimp_object_get_memsize (GIMP_OBJECT (list->data), gui_size) +
@ -348,7 +348,7 @@ gimp_vectors_bounds (GimpItem *item,
gdouble *width, gdouble *width,
gdouble *height) gdouble *height)
{ {
GimpVectors *vectors = GIMP_VECTORS (item); GimpPath *vectors = GIMP_PATH (item);
if (! vectors->bounds_valid) if (! vectors->bounds_valid)
{ {
@ -413,14 +413,14 @@ gimp_vectors_duplicate (GimpItem *item,
{ {
GimpItem *new_item; GimpItem *new_item;
g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_VECTORS), NULL); g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_PATH), NULL);
new_item = GIMP_ITEM_CLASS (parent_class)->duplicate (item, new_type); new_item = GIMP_ITEM_CLASS (parent_class)->duplicate (item, new_type);
if (GIMP_IS_VECTORS (new_item)) if (GIMP_IS_PATH (new_item))
{ {
GimpVectors *vectors = GIMP_VECTORS (item); GimpPath *vectors = GIMP_PATH (item);
GimpVectors *new_vectors = GIMP_VECTORS (new_item); GimpPath *new_vectors = GIMP_PATH (new_item);
gimp_vectors_copy_strokes (vectors, new_vectors); gimp_vectors_copy_strokes (vectors, new_vectors);
} }
@ -446,8 +446,8 @@ gimp_vectors_translate (GimpItem *item,
gdouble offset_y, gdouble offset_y,
gboolean push_undo) gboolean push_undo)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GList *list; GList *list;
gimp_vectors_freeze (path); gimp_vectors_freeze (path);
@ -475,9 +475,9 @@ gimp_vectors_scale (GimpItem *item,
GimpInterpolationType interpolation_type, GimpInterpolationType interpolation_type,
GimpProgress *progress) GimpProgress *progress)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GimpImage *image = gimp_item_get_image (item); GimpImage *image = gimp_item_get_image (item);
GList *list; GList *list;
gimp_vectors_freeze (path); gimp_vectors_freeze (path);
@ -512,9 +512,9 @@ gimp_vectors_resize (GimpItem *item,
gint offset_x, gint offset_x,
gint offset_y) gint offset_y)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GimpImage *image = gimp_item_get_image (item); GimpImage *image = gimp_item_get_image (item);
GList *list; GList *list;
gimp_vectors_freeze (path); gimp_vectors_freeze (path);
@ -543,7 +543,7 @@ gimp_vectors_flip (GimpItem *item,
gdouble axis, gdouble axis,
gboolean clip_result) gboolean clip_result)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GList *list; GList *list;
GimpMatrix3 matrix; GimpMatrix3 matrix;
@ -574,7 +574,7 @@ gimp_vectors_rotate (GimpItem *item,
gdouble center_y, gdouble center_y,
gboolean clip_result) gboolean clip_result)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GList *list; GList *list;
GimpMatrix3 matrix; GimpMatrix3 matrix;
@ -606,7 +606,7 @@ gimp_vectors_transform (GimpItem *item,
GimpTransformResize clip_result, GimpTransformResize clip_result,
GimpProgress *progress) GimpProgress *progress)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GimpMatrix3 local_matrix; GimpMatrix3 local_matrix;
GQueue strokes; GQueue strokes;
GList *list; GList *list;
@ -668,7 +668,7 @@ gimp_vectors_fill (GimpItem *item,
GimpProgress *progress, GimpProgress *progress,
GError **error) GError **error)
{ {
GimpVectors *vectors = GIMP_VECTORS (item); GimpPath *vectors = GIMP_PATH (item);
if (g_queue_is_empty (vectors->strokes)) if (g_queue_is_empty (vectors->strokes))
{ {
@ -689,7 +689,7 @@ gimp_vectors_stroke (GimpItem *item,
GimpProgress *progress, GimpProgress *progress,
GError **error) GError **error)
{ {
GimpVectors *vectors = GIMP_VECTORS (item); GimpPath *vectors = GIMP_PATH (item);
gboolean retval = FALSE; gboolean retval = FALSE;
if (g_queue_is_empty (vectors->strokes)) if (g_queue_is_empty (vectors->strokes))
@ -744,7 +744,7 @@ gimp_vectors_to_selection (GimpItem *item,
gdouble feather_radius_x, gdouble feather_radius_x,
gdouble feather_radius_y) gdouble feather_radius_y)
{ {
GimpVectors *path = GIMP_VECTORS (item); GimpPath *path = GIMP_PATH (item);
GimpImage *image = gimp_item_get_image (item); GimpImage *image = gimp_item_get_image (item);
gimp_channel_select_vectors (gimp_image_get_mask (image), gimp_channel_select_vectors (gimp_image_get_mask (image),
@ -756,7 +756,7 @@ gimp_vectors_to_selection (GimpItem *item,
} }
static void static void
gimp_vectors_real_freeze (GimpVectors *vectors) gimp_vectors_real_freeze (GimpPath *vectors)
{ {
/* release cached bezier representation */ /* release cached bezier representation */
if (vectors->bezier_desc) if (vectors->bezier_desc)
@ -770,7 +770,7 @@ gimp_vectors_real_freeze (GimpVectors *vectors)
} }
static void static void
gimp_vectors_real_thaw (GimpVectors *vectors) gimp_vectors_real_thaw (GimpPath *vectors)
{ {
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (vectors)); gimp_viewable_invalidate_preview (GIMP_VIEWABLE (vectors));
} }
@ -778,60 +778,60 @@ gimp_vectors_real_thaw (GimpVectors *vectors)
/* public functions */ /* public functions */
GimpVectors * GimpPath *
gimp_vectors_new (GimpImage *image, gimp_vectors_new (GimpImage *image,
const gchar *name) const gchar *name)
{ {
GimpVectors *vectors; GimpPath *vectors;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
vectors = GIMP_VECTORS (gimp_item_new (GIMP_TYPE_VECTORS, vectors = GIMP_PATH (gimp_item_new (GIMP_TYPE_PATH,
image, name, image, name,
0, 0, 0, 0,
gimp_image_get_width (image), gimp_image_get_width (image),
gimp_image_get_height (image))); gimp_image_get_height (image)));
return vectors; return vectors;
} }
GimpVectors * GimpPath *
gimp_vectors_get_parent (GimpVectors *vectors) gimp_vectors_get_parent (GimpPath *vectors)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
return GIMP_VECTORS (gimp_viewable_get_parent (GIMP_VIEWABLE (vectors))); return GIMP_PATH (gimp_viewable_get_parent (GIMP_VIEWABLE (vectors)));
} }
void void
gimp_vectors_freeze (GimpVectors *vectors) gimp_vectors_freeze (GimpPath *vectors)
{ {
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
vectors->freeze_count++; vectors->freeze_count++;
if (vectors->freeze_count == 1) if (vectors->freeze_count == 1)
g_signal_emit (vectors, gimp_vectors_signals[FREEZE], 0); g_signal_emit (vectors, gimp_path_signals[FREEZE], 0);
} }
void void
gimp_vectors_thaw (GimpVectors *vectors) gimp_vectors_thaw (GimpPath *vectors)
{ {
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
g_return_if_fail (vectors->freeze_count > 0); g_return_if_fail (vectors->freeze_count > 0);
vectors->freeze_count--; vectors->freeze_count--;
if (vectors->freeze_count == 0) if (vectors->freeze_count == 0)
g_signal_emit (vectors, gimp_vectors_signals[THAW], 0); g_signal_emit (vectors, gimp_path_signals[THAW], 0);
} }
void void
gimp_vectors_copy_strokes (GimpVectors *src_vectors, gimp_vectors_copy_strokes (GimpPath *src_vectors,
GimpVectors *dest_vectors) GimpPath *dest_vectors)
{ {
g_return_if_fail (GIMP_IS_VECTORS (src_vectors)); g_return_if_fail (GIMP_IS_PATH (src_vectors));
g_return_if_fail (GIMP_IS_VECTORS (dest_vectors)); g_return_if_fail (GIMP_IS_PATH (dest_vectors));
gimp_vectors_freeze (dest_vectors); gimp_vectors_freeze (dest_vectors);
@ -848,13 +848,13 @@ gimp_vectors_copy_strokes (GimpVectors *src_vectors,
void void
gimp_vectors_add_strokes (GimpVectors *src_vectors, gimp_vectors_add_strokes (GimpPath *src_vectors,
GimpVectors *dest_vectors) GimpPath *dest_vectors)
{ {
GList *stroke; GList *stroke;
g_return_if_fail (GIMP_IS_VECTORS (src_vectors)); g_return_if_fail (GIMP_IS_PATH (src_vectors));
g_return_if_fail (GIMP_IS_VECTORS (dest_vectors)); g_return_if_fail (GIMP_IS_PATH (dest_vectors));
gimp_vectors_freeze (dest_vectors); gimp_vectors_freeze (dest_vectors);
@ -881,21 +881,21 @@ gimp_vectors_add_strokes (GimpVectors *src_vectors,
void void
gimp_vectors_stroke_add (GimpVectors *vectors, gimp_vectors_stroke_add (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
g_return_if_fail (GIMP_IS_STROKE (stroke)); g_return_if_fail (GIMP_IS_STROKE (stroke));
gimp_vectors_freeze (vectors); gimp_vectors_freeze (vectors);
GIMP_VECTORS_GET_CLASS (vectors)->stroke_add (vectors, stroke); GIMP_PATH_GET_CLASS (vectors)->stroke_add (vectors, stroke);
gimp_vectors_thaw (vectors); gimp_vectors_thaw (vectors);
} }
static void static void
gimp_vectors_real_stroke_add (GimpVectors *vectors, gimp_vectors_real_stroke_add (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
/* /*
@ -914,21 +914,21 @@ gimp_vectors_real_stroke_add (GimpVectors *vectors,
} }
void void
gimp_vectors_stroke_remove (GimpVectors *vectors, gimp_vectors_stroke_remove (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
g_return_if_fail (GIMP_IS_STROKE (stroke)); g_return_if_fail (GIMP_IS_STROKE (stroke));
gimp_vectors_freeze (vectors); gimp_vectors_freeze (vectors);
GIMP_VECTORS_GET_CLASS (vectors)->stroke_remove (vectors, stroke); GIMP_PATH_GET_CLASS (vectors)->stroke_remove (vectors, stroke);
gimp_vectors_thaw (vectors); gimp_vectors_thaw (vectors);
} }
static void static void
gimp_vectors_real_stroke_remove (GimpVectors *vectors, gimp_vectors_real_stroke_remove (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
GList *list = g_hash_table_lookup (vectors->stroke_to_list, stroke); GList *list = g_hash_table_lookup (vectors->stroke_to_list, stroke);
@ -942,25 +942,25 @@ gimp_vectors_real_stroke_remove (GimpVectors *vectors,
} }
gint gint
gimp_vectors_get_n_strokes (GimpVectors *vectors) gimp_vectors_get_n_strokes (GimpPath *vectors)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0);
return g_queue_get_length (vectors->strokes); return g_queue_get_length (vectors->strokes);
} }
GimpStroke * GimpStroke *
gimp_vectors_stroke_get (GimpVectors *vectors, gimp_vectors_stroke_get (GimpPath *vectors,
const GimpCoords *coord) const GimpCoords *coord)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
return GIMP_VECTORS_GET_CLASS (vectors)->stroke_get (vectors, coord); return GIMP_PATH_GET_CLASS (vectors)->stroke_get (vectors, coord);
} }
static GimpStroke * static GimpStroke *
gimp_vectors_real_stroke_get (GimpVectors *vectors, gimp_vectors_real_stroke_get (GimpPath *vectors,
const GimpCoords *coord) const GimpCoords *coord)
{ {
GimpStroke *minstroke = NULL; GimpStroke *minstroke = NULL;
@ -989,12 +989,12 @@ gimp_vectors_real_stroke_get (GimpVectors *vectors,
} }
GimpStroke * GimpStroke *
gimp_vectors_stroke_get_by_id (GimpVectors *vectors, gimp_vectors_stroke_get_by_id (GimpPath *vectors,
gint id) gint id)
{ {
GList *list; GList *list;
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
for (list = vectors->strokes->head; list; list = g_list_next (list)) for (list = vectors->strokes->head; list; list = g_list_next (list))
{ {
@ -1007,16 +1007,16 @@ gimp_vectors_stroke_get_by_id (GimpVectors *vectors,
GimpStroke * GimpStroke *
gimp_vectors_stroke_get_next (GimpVectors *vectors, gimp_vectors_stroke_get_next (GimpPath *vectors,
GimpStroke *prev) GimpStroke *prev)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
return GIMP_VECTORS_GET_CLASS (vectors)->stroke_get_next (vectors, prev); return GIMP_PATH_GET_CLASS (vectors)->stroke_get_next (vectors, prev);
} }
static GimpStroke * static GimpStroke *
gimp_vectors_real_stroke_get_next (GimpVectors *vectors, gimp_vectors_real_stroke_get_next (GimpPath *vectors,
GimpStroke *prev) GimpStroke *prev)
{ {
if (! prev) if (! prev)
@ -1035,20 +1035,20 @@ gimp_vectors_real_stroke_get_next (GimpVectors *vectors,
gdouble gdouble
gimp_vectors_stroke_get_length (GimpVectors *vectors, gimp_vectors_stroke_get_length (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0.0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0.0);
g_return_val_if_fail (GIMP_IS_STROKE (stroke), 0.0); g_return_val_if_fail (GIMP_IS_STROKE (stroke), 0.0);
return GIMP_VECTORS_GET_CLASS (vectors)->stroke_get_length (vectors, stroke); return GIMP_PATH_GET_CLASS (vectors)->stroke_get_length (vectors, stroke);
} }
static gdouble static gdouble
gimp_vectors_real_stroke_get_length (GimpVectors *vectors, gimp_vectors_real_stroke_get_length (GimpPath *vectors,
GimpStroke *stroke) GimpStroke *stroke)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0.0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0.0);
g_return_val_if_fail (GIMP_IS_STROKE (stroke), 0.0); g_return_val_if_fail (GIMP_IS_STROKE (stroke), 0.0);
return gimp_stroke_get_length (stroke, vectors->precision); return gimp_stroke_get_length (stroke, vectors->precision);
@ -1056,18 +1056,18 @@ gimp_vectors_real_stroke_get_length (GimpVectors *vectors,
GimpAnchor * GimpAnchor *
gimp_vectors_anchor_get (GimpVectors *vectors, gimp_vectors_anchor_get (GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
GimpStroke **ret_stroke) GimpStroke **ret_stroke)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
return GIMP_VECTORS_GET_CLASS (vectors)->anchor_get (vectors, coord, return GIMP_PATH_GET_CLASS (vectors)->anchor_get (vectors, coord,
ret_stroke); ret_stroke);
} }
static GimpAnchor * static GimpAnchor *
gimp_vectors_real_anchor_get (GimpVectors *vectors, gimp_vectors_real_anchor_get (GimpPath *vectors,
const GimpCoords *coord, const GimpCoords *coord,
GimpStroke **ret_stroke) GimpStroke **ret_stroke)
{ {
@ -1101,24 +1101,24 @@ gimp_vectors_real_anchor_get (GimpVectors *vectors,
void void
gimp_vectors_anchor_delete (GimpVectors *vectors, gimp_vectors_anchor_delete (GimpPath *vectors,
GimpAnchor *anchor) GimpAnchor *anchor)
{ {
g_return_if_fail (GIMP_IS_VECTORS (vectors)); g_return_if_fail (GIMP_IS_PATH (vectors));
g_return_if_fail (anchor != NULL); g_return_if_fail (anchor != NULL);
GIMP_VECTORS_GET_CLASS (vectors)->anchor_delete (vectors, anchor); GIMP_PATH_GET_CLASS (vectors)->anchor_delete (vectors, anchor);
} }
static void static void
gimp_vectors_real_anchor_delete (GimpVectors *vectors, gimp_vectors_real_anchor_delete (GimpPath *vectors,
GimpAnchor *anchor) GimpAnchor *anchor)
{ {
} }
void void
gimp_vectors_anchor_select (GimpVectors *vectors, gimp_vectors_anchor_select (GimpPath *vectors,
GimpStroke *target_stroke, GimpStroke *target_stroke,
GimpAnchor *anchor, GimpAnchor *anchor,
gboolean selected, gboolean selected,
@ -1138,16 +1138,16 @@ gimp_vectors_anchor_select (GimpVectors *vectors,
gdouble gdouble
gimp_vectors_get_length (GimpVectors *vectors, gimp_vectors_get_length (GimpPath *vectors,
const GimpAnchor *start) const GimpAnchor *start)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0.0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0.0);
return GIMP_VECTORS_GET_CLASS (vectors)->get_length (vectors, start); return GIMP_PATH_GET_CLASS (vectors)->get_length (vectors, start);
} }
static gdouble static gdouble
gimp_vectors_real_get_length (GimpVectors *vectors, gimp_vectors_real_get_length (GimpPath *vectors,
const GimpAnchor *start) const GimpAnchor *start)
{ {
g_printerr ("gimp_vectors_get_length: default implementation\n"); g_printerr ("gimp_vectors_get_length: default implementation\n");
@ -1157,16 +1157,16 @@ gimp_vectors_real_get_length (GimpVectors *vectors,
gdouble gdouble
gimp_vectors_get_distance (GimpVectors *vectors, gimp_vectors_get_distance (GimpPath *vectors,
const GimpCoords *coord) const GimpCoords *coord)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0.0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0.0);
return GIMP_VECTORS_GET_CLASS (vectors)->get_distance (vectors, coord); return GIMP_PATH_GET_CLASS (vectors)->get_distance (vectors, coord);
} }
static gdouble static gdouble
gimp_vectors_real_get_distance (GimpVectors *vectors, gimp_vectors_real_get_distance (GimpPath *vectors,
const GimpCoords *coord) const GimpCoords *coord)
{ {
g_printerr ("gimp_vectors_get_distance: default implementation\n"); g_printerr ("gimp_vectors_get_distance: default implementation\n");
@ -1175,21 +1175,21 @@ gimp_vectors_real_get_distance (GimpVectors *vectors,
} }
gint gint
gimp_vectors_interpolate (GimpVectors *vectors, gimp_vectors_interpolate (GimpPath *vectors,
GimpStroke *stroke, GimpStroke *stroke,
gdouble precision, gdouble precision,
gint max_points, gint max_points,
GimpCoords *ret_coords) GimpCoords *ret_coords)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), 0); g_return_val_if_fail (GIMP_IS_PATH (vectors), 0);
return GIMP_VECTORS_GET_CLASS (vectors)->interpolate (vectors, stroke, return GIMP_PATH_GET_CLASS (vectors)->interpolate (vectors, stroke,
precision, max_points, precision, max_points,
ret_coords); ret_coords);
} }
static gint static gint
gimp_vectors_real_interpolate (GimpVectors *vectors, gimp_vectors_real_interpolate (GimpPath *vectors,
GimpStroke *stroke, GimpStroke *stroke,
gdouble precision, gdouble precision,
gint max_points, gint max_points,
@ -1201,9 +1201,9 @@ gimp_vectors_real_interpolate (GimpVectors *vectors,
} }
const GimpBezierDesc * const GimpBezierDesc *
gimp_vectors_get_bezier (GimpVectors *vectors) gimp_vectors_get_bezier (GimpPath *vectors)
{ {
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
if (! vectors->bezier_desc) if (! vectors->bezier_desc)
{ {
@ -1214,13 +1214,13 @@ gimp_vectors_get_bezier (GimpVectors *vectors)
} }
static GimpBezierDesc * static GimpBezierDesc *
gimp_vectors_make_bezier (GimpVectors *vectors) gimp_vectors_make_bezier (GimpPath *vectors)
{ {
return GIMP_VECTORS_GET_CLASS (vectors)->make_bezier (vectors); return GIMP_PATH_GET_CLASS (vectors)->make_bezier (vectors);
} }
static GimpBezierDesc * static GimpBezierDesc *
gimp_vectors_real_make_bezier (GimpVectors *vectors) gimp_vectors_real_make_bezier (GimpPath *vectors)
{ {
GimpStroke *stroke; GimpStroke *stroke;
GArray *cmd_array; GArray *cmd_array;

View file

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program /* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* *
* gimpvectors.h * gimppath.h
* Copyright (C) 2002 Simon Budig <simon@gimp.org> * Copyright (C) 2002 Simon Budig <simon@gimp.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -18,22 +18,22 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef __GIMP_VECTORS_H__ #ifndef __GIMP_PATH_H__
#define __GIMP_VECTORS_H__ #define __GIMP_PATH_H__
#include "core/gimpitem.h" #include "core/gimpitem.h"
#define GIMP_TYPE_VECTORS (gimp_vectors_get_type ()) #define GIMP_TYPE_PATH (gimp_path_get_type ())
#define GIMP_VECTORS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_VECTORS, GimpVectors)) #define GIMP_PATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PATH, GimpPath))
#define GIMP_VECTORS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_VECTORS, GimpVectorsClass)) #define GIMP_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PATH, GimpPathClass))
#define GIMP_IS_VECTORS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_VECTORS)) #define GIMP_IS_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PATH))
#define GIMP_IS_VECTORS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_VECTORS)) #define GIMP_IS_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PATH))
#define GIMP_VECTORS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_VECTORS, GimpVectorsClass)) #define GIMP_PATH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PATH, GimpPathClass))
typedef struct _GimpVectorsClass GimpVectorsClass; typedef struct _GimpPathClass GimpPathClass;
struct _GimpVectors struct _GimpPath
{ {
GimpItem parent_instance; GimpItem parent_instance;
@ -54,122 +54,122 @@ struct _GimpVectors
gdouble bounds_y2; gdouble bounds_y2;
}; };
struct _GimpVectorsClass struct _GimpPathClass
{ {
GimpItemClass parent_class; GimpItemClass parent_class;
/* signals */ /* signals */
void (* freeze) (GimpVectors *vectors); void (* freeze) (GimpPath *path);
void (* thaw) (GimpVectors *vectors); void (* thaw) (GimpPath *path);
/* virtual functions */ /* virtual functions */
void (* stroke_add) (GimpVectors *vectors, void (* stroke_add) (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
void (* stroke_remove) (GimpVectors *vectors, void (* stroke_remove) (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
GimpStroke * (* stroke_get) (GimpVectors *vectors, GimpStroke * (* stroke_get) (GimpPath *path,
const GimpCoords *coord); const GimpCoords *coord);
GimpStroke * (* stroke_get_next) (GimpVectors *vectors, GimpStroke * (* stroke_get_next) (GimpPath *path,
GimpStroke *prev); GimpStroke *prev);
gdouble (* stroke_get_length) (GimpVectors *vectors, gdouble (* stroke_get_length) (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
GimpAnchor * (* anchor_get) (GimpVectors *vectors, GimpAnchor * (* anchor_get) (GimpPath *path,
const GimpCoords *coord, const GimpCoords *coord,
GimpStroke **ret_stroke); GimpStroke **ret_stroke);
void (* anchor_delete) (GimpVectors *vectors, void (* anchor_delete) (GimpPath *path,
GimpAnchor *anchor); GimpAnchor *anchor);
gdouble (* get_length) (GimpVectors *vectors, gdouble (* get_length) (GimpPath *path,
const GimpAnchor *start); const GimpAnchor *start);
gdouble (* get_distance) (GimpVectors *vectors, gdouble (* get_distance) (GimpPath *path,
const GimpCoords *coord); const GimpCoords *coord);
gint (* interpolate) (GimpVectors *vectors, gint (* interpolate) (GimpPath *path,
GimpStroke *stroke, GimpStroke *stroke,
gdouble precision, gdouble precision,
gint max_points, gint max_points,
GimpCoords *ret_coords); GimpCoords *ret_coords);
GimpBezierDesc * (* make_bezier) (GimpVectors *vectors); GimpBezierDesc * (* make_bezier) (GimpPath *path);
}; };
/* vectors utility functions */ /* path utility functions */
GType gimp_vectors_get_type (void) G_GNUC_CONST; GType gimp_path_get_type (void) G_GNUC_CONST;
GimpVectors * gimp_vectors_new (GimpImage *image, GimpPath * gimp_vectors_new (GimpImage *image,
const gchar *name); const gchar *name);
GimpVectors * gimp_vectors_get_parent (GimpVectors *vectors); GimpPath * gimp_vectors_get_parent (GimpPath *path);
void gimp_vectors_freeze (GimpVectors *vectors); void gimp_vectors_freeze (GimpPath *path);
void gimp_vectors_thaw (GimpVectors *vectors); void gimp_vectors_thaw (GimpPath *path);
void gimp_vectors_copy_strokes (GimpVectors *src_vectors, void gimp_vectors_copy_strokes (GimpPath *src_vectors,
GimpVectors *dest_vectors); GimpPath *dest_vectors);
void gimp_vectors_add_strokes (GimpVectors *src_vectors, void gimp_vectors_add_strokes (GimpPath *src_vectors,
GimpVectors *dest_vectors); GimpPath *dest_vectors);
/* accessing / modifying the anchors */ /* accessing / modifying the anchors */
GimpAnchor * gimp_vectors_anchor_get (GimpVectors *vectors, GimpAnchor * gimp_vectors_anchor_get (GimpPath *path,
const GimpCoords *coord, const GimpCoords *coord,
GimpStroke **ret_stroke); GimpStroke **ret_stroke);
/* prev == NULL: "first" anchor */ /* prev == NULL: "first" anchor */
GimpAnchor * gimp_vectors_anchor_get_next (GimpVectors *vectors, GimpAnchor * gimp_vectors_anchor_get_next (GimpPath *path,
const GimpAnchor *prev); const GimpAnchor *prev);
/* type will be an xorable enum: /* type will be an xorable enum:
* VECTORS_NONE, VECTORS_FIX_ANGLE, VECTORS_FIX_RATIO, VECTORS_RESTRICT_ANGLE * VECTORS_NONE, VECTORS_FIX_ANGLE, VECTORS_FIX_RATIO, VECTORS_RESTRICT_ANGLE
* or so. * or so.
*/ */
void gimp_vectors_anchor_move_relative (GimpVectors *vectors, void gimp_vectors_anchor_move_relative (GimpPath *path,
GimpAnchor *anchor, GimpAnchor *anchor,
const GimpCoords *deltacoord, const GimpCoords *deltacoord,
gint type); gint type);
void gimp_vectors_anchor_move_absolute (GimpVectors *vectors, void gimp_vectors_anchor_move_absolute (GimpPath *path,
GimpAnchor *anchor, GimpAnchor *anchor,
const GimpCoords *coord, const GimpCoords *coord,
gint type); gint type);
void gimp_vectors_anchor_delete (GimpVectors *vectors, void gimp_vectors_anchor_delete (GimpPath *path,
GimpAnchor *anchor); GimpAnchor *anchor);
void gimp_vectors_anchor_select (GimpVectors *vectors, void gimp_vectors_anchor_select (GimpPath *path,
GimpStroke *target_stroke, GimpStroke *target_stroke,
GimpAnchor *anchor, GimpAnchor *anchor,
gboolean selected, gboolean selected,
gboolean exclusive); gboolean exclusive);
/* GimpStroke is a connected component of a GimpVectors object */ /* GimpStroke is a connected component of a GimpPath object */
void gimp_vectors_stroke_add (GimpVectors *vectors, void gimp_vectors_stroke_add (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
void gimp_vectors_stroke_remove (GimpVectors *vectors, void gimp_vectors_stroke_remove (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
gint gimp_vectors_get_n_strokes (GimpVectors *vectors); gint gimp_vectors_get_n_strokes (GimpPath *path);
GimpStroke * gimp_vectors_stroke_get (GimpVectors *vectors, GimpStroke * gimp_vectors_stroke_get (GimpPath *path,
const GimpCoords *coord); const GimpCoords *coord);
GimpStroke * gimp_vectors_stroke_get_by_id (GimpVectors *vectors, GimpStroke * gimp_vectors_stroke_get_by_id (GimpPath *path,
gint id); gint id);
/* prev == NULL: "first" stroke */ /* prev == NULL: "first" stroke */
GimpStroke * gimp_vectors_stroke_get_next (GimpVectors *vectors, GimpStroke * gimp_vectors_stroke_get_next (GimpPath *path,
GimpStroke *prev); GimpStroke *prev);
gdouble gimp_vectors_stroke_get_length (GimpVectors *vectors, gdouble gimp_vectors_stroke_get_length (GimpPath *path,
GimpStroke *stroke); GimpStroke *stroke);
/* accessing the shape of the curve */ /* accessing the shape of the curve */
gdouble gimp_vectors_get_length (GimpVectors *vectors, gdouble gimp_vectors_get_length (GimpPath *path,
const GimpAnchor *start); const GimpAnchor *start);
gdouble gimp_vectors_get_distance (GimpVectors *vectors, gdouble gimp_vectors_get_distance (GimpPath *path,
const GimpCoords *coord); const GimpCoords *coord);
/* returns the number of valid coordinates */ /* returns the number of valid coordinates */
gint gimp_vectors_interpolate (GimpVectors *vectors, gint gimp_vectors_interpolate (GimpPath *path,
GimpStroke *stroke, GimpStroke *stroke,
gdouble precision, gdouble precision,
gint max_points, gint max_points,
@ -178,7 +178,7 @@ gint gimp_vectors_interpolate (GimpVectors *vectors,
/* usually overloaded */ /* usually overloaded */
/* returns a bezier representation */ /* returns a bezier representation */
const GimpBezierDesc * gimp_vectors_get_bezier (GimpVectors *vectors); const GimpBezierDesc * gimp_vectors_get_bezier (GimpPath *path);
#endif /* __GIMP_VECTORS_H__ */ #endif /* __GIMP_VECTORS_H__ */

View file

@ -29,7 +29,7 @@
#include "gimpanchor.h" #include "gimpanchor.h"
#include "gimpbezierstroke.h" #include "gimpbezierstroke.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpvectors-compat.h" #include "gimpvectors-compat.h"
@ -44,14 +44,14 @@ enum
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES; static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
GimpVectors * GimpPath *
gimp_vectors_compat_new (GimpImage *image, gimp_vectors_compat_new (GimpImage *image,
const gchar *name, const gchar *name,
GimpVectorsCompatPoint *points, GimpVectorsCompatPoint *points,
gint n_points, gint n_points,
gboolean closed) gboolean closed)
{ {
GimpVectors *vectors; GimpPath *vectors;
GimpStroke *stroke; GimpStroke *stroke;
GimpCoords *coords; GimpCoords *coords;
GimpCoords *curr_stroke; GimpCoords *curr_stroke;
@ -135,7 +135,7 @@ gimp_vectors_compat_is_compatible (GimpImage *image)
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {
GimpVectors *vectors = GIMP_VECTORS (list->data); GimpPath *vectors = GIMP_PATH (list->data);
GList *strokes; GList *strokes;
gint open_count = 0; gint open_count = 0;
@ -163,9 +163,9 @@ gimp_vectors_compat_is_compatible (GimpImage *image)
} }
GimpVectorsCompatPoint * GimpVectorsCompatPoint *
gimp_vectors_compat_get_points (GimpVectors *vectors, gimp_vectors_compat_get_points (GimpPath *vectors,
gint32 *n_points, gint32 *n_points,
gint32 *closed) gint32 *closed)
{ {
GimpVectorsCompatPoint *points; GimpVectorsCompatPoint *points;
GList *strokes; GList *strokes;
@ -174,7 +174,7 @@ gimp_vectors_compat_get_points (GimpVectors *vectors,
gint open_count; gint open_count;
gboolean first_stroke = TRUE; gboolean first_stroke = TRUE;
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL); g_return_val_if_fail (GIMP_IS_PATH (vectors), NULL);
g_return_val_if_fail (n_points != NULL, NULL); g_return_val_if_fail (n_points != NULL, NULL);
g_return_val_if_fail (closed != NULL, NULL); g_return_val_if_fail (closed != NULL, NULL);

View file

@ -32,7 +32,7 @@ struct _GimpVectorsCompatPoint
}; };
GimpVectors * gimp_vectors_compat_new (GimpImage *image, GimpPath * gimp_vectors_compat_new (GimpImage *image,
const gchar *name, const gchar *name,
GimpVectorsCompatPoint *points, GimpVectorsCompatPoint *points,
gint n_points, gint n_points,
@ -40,7 +40,7 @@ GimpVectors * gimp_vectors_compat_new (GimpImage *image,
gboolean gimp_vectors_compat_is_compatible (GimpImage *image); gboolean gimp_vectors_compat_is_compatible (GimpImage *image);
GimpVectorsCompatPoint * gimp_vectors_compat_get_points (GimpVectors *vectors, GimpVectorsCompatPoint * gimp_vectors_compat_get_points (GimpPath *vectors,
gint32 *n_points, gint32 *n_points,
gint32 *closed); gint32 *closed);

View file

@ -28,9 +28,9 @@
#include "core/gimpitem.h" #include "core/gimpitem.h"
#include "gimpanchor.h" #include "gimpanchor.h"
#include "gimpstroke.h"
#include "gimpbezierstroke.h" #include "gimpbezierstroke.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpstroke.h"
#include "gimpvectors-export.h" #include "gimpvectors-export.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -40,15 +40,15 @@ static GString * gimp_vectors_export (GimpImage *image,
GList *vectors); GList *vectors);
static void gimp_vectors_export_image_size (GimpImage *image, static void gimp_vectors_export_image_size (GimpImage *image,
GString *str); GString *str);
static void gimp_vectors_export_path (GimpVectors *vectors, static void gimp_vectors_export_path (GimpPath *vectors,
GString *str); GString *str);
static gchar * gimp_vectors_export_path_data (GimpVectors *vectors); static gchar * gimp_vectors_export_path_data (GimpPath *vectors);
/** /**
* gimp_vectors_export_file: * gimp_vectors_export_file:
* @image: the #GimpImage from which to export * @image: the #GimpImage from which to export
* @path_list: a #GList of #GimpVectors objects or %NULL to export all paths in @image * @path_list: a #GList of #GimpPath objects or %NULL to export all paths in @image
* @file: the file to write * @file: the file to write
* @error: return location for errors * @error: return location for errors
* *
@ -115,7 +115,7 @@ gimp_vectors_export_file (GimpImage *image,
/** /**
* gimp_vectors_export_string: * gimp_vectors_export_string:
* @image: the #GimpImage from which to export * @image: the #GimpImage from which to export
* @path_list: a #GList of #GimpVectors objects, or %NULL to export all paths in @image * @path_list: a #GList of #GimpPath objects, or %NULL to export all paths in @image
* *
* Exports one or more vectors aka path to a SVG string. * Exports one or more vectors aka path to a SVG string.
* *
@ -162,7 +162,7 @@ gimp_vectors_export (GimpImage *image,
vectors = gimp_image_get_path_iter (image); vectors = gimp_image_get_path_iter (image);
for (list = vectors; list; list = list->next) for (list = vectors; list; list = list->next)
gimp_vectors_export_path (GIMP_VECTORS (list->data), str); gimp_vectors_export_path (GIMP_PATH (list->data), str);
g_string_append (str, "</svg>\n"); g_string_append (str, "</svg>\n");
@ -210,8 +210,8 @@ gimp_vectors_export_image_size (GimpImage *image,
} }
static void static void
gimp_vectors_export_path (GimpVectors *vectors, gimp_vectors_export_path (GimpPath *vectors,
GString *str) GString *str)
{ {
const gchar *name = gimp_object_get_name (vectors); const gchar *name = gimp_object_get_name (vectors);
gchar *data = gimp_vectors_export_path_data (vectors); gchar *data = gimp_vectors_export_path_data (vectors);
@ -233,7 +233,7 @@ gimp_vectors_export_path (GimpVectors *vectors,
#define NEWLINE "\n " #define NEWLINE "\n "
static gchar * static gchar *
gimp_vectors_export_path_data (GimpVectors *vectors) gimp_vectors_export_path_data (GimpPath *vectors)
{ {
GString *str; GString *str;
GList *strokes; GList *strokes;

View file

@ -49,7 +49,7 @@
#include "gimpbezierstroke.h" #include "gimpbezierstroke.h"
#include "gimpstroke.h" #include "gimpstroke.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpvectors-import.h" #include "gimpvectors-import.h"
#include "gimp-intl.h" #include "gimp-intl.h"
@ -111,7 +111,7 @@ static gboolean gimp_vectors_import (GimpImage *image,
gsize len, gsize len,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error); GError **error);
@ -199,7 +199,7 @@ static GList * parse_path_data (const gchar *data);
* gimp_vectors_import_file: * gimp_vectors_import_file:
* @image: the #GimpImage to add the paths to * @image: the #GimpImage to add the paths to
* @file: a SVG file * @file: a SVG file
* @merge: should multiple paths be merged into a single #GimpVectors object * @merge: should multiple paths be merged into a single #GimpPath object
* @scale: should the SVG be scaled to fit the image dimensions * @scale: should the SVG be scaled to fit the image dimensions
* @position: position in the image's vectors stack where to add the vectors * @position: position in the image's vectors stack where to add the vectors
* @error: location to store possible errors * @error: location to store possible errors
@ -213,7 +213,7 @@ gimp_vectors_import_file (GimpImage *image,
GFile *file, GFile *file,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error) GError **error)
@ -222,7 +222,7 @@ gimp_vectors_import_file (GimpImage *image,
g_return_val_if_fail (G_IS_FILE (file), FALSE); g_return_val_if_fail (G_IS_FILE (file), FALSE);
g_return_val_if_fail (parent == NULL || g_return_val_if_fail (parent == NULL ||
parent == GIMP_IMAGE_ACTIVE_PARENT || parent == GIMP_IMAGE_ACTIVE_PARENT ||
GIMP_IS_VECTORS (parent), FALSE); GIMP_IS_PATH (parent), FALSE);
g_return_val_if_fail (parent == NULL || g_return_val_if_fail (parent == NULL ||
parent == GIMP_IMAGE_ACTIVE_PARENT || parent == GIMP_IMAGE_ACTIVE_PARENT ||
gimp_item_is_attached (GIMP_ITEM (parent)), FALSE); gimp_item_is_attached (GIMP_ITEM (parent)), FALSE);
@ -247,7 +247,7 @@ gimp_vectors_import_file (GimpImage *image,
* @image: the #GimpImage to add the paths to * @image: the #GimpImage to add the paths to
* @buffer: a character buffer to parse * @buffer: a character buffer to parse
* @len: number of bytes in @str or -1 if @str is %NUL-terminated * @len: number of bytes in @str or -1 if @str is %NUL-terminated
* @merge: should multiple paths be merged into a single #GimpVectors object * @merge: should multiple paths be merged into a single #GimpPath object
* @scale: should the SVG be scaled to fit the image dimensions * @scale: should the SVG be scaled to fit the image dimensions
* @error: location to store possible errors * @error: location to store possible errors
* *
@ -261,7 +261,7 @@ gimp_vectors_import_buffer (GimpImage *image,
gsize len, gsize len,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error) GError **error)
@ -270,7 +270,7 @@ gimp_vectors_import_buffer (GimpImage *image,
g_return_val_if_fail (buffer != NULL || len == 0, FALSE); g_return_val_if_fail (buffer != NULL || len == 0, FALSE);
g_return_val_if_fail (parent == NULL || g_return_val_if_fail (parent == NULL ||
parent == GIMP_IMAGE_ACTIVE_PARENT || parent == GIMP_IMAGE_ACTIVE_PARENT ||
GIMP_IS_VECTORS (parent), FALSE); GIMP_IS_PATH (parent), FALSE);
g_return_val_if_fail (parent == NULL || g_return_val_if_fail (parent == NULL ||
parent == GIMP_IMAGE_ACTIVE_PARENT || parent == GIMP_IMAGE_ACTIVE_PARENT ||
gimp_item_is_attached (GIMP_ITEM (parent)), FALSE); gimp_item_is_attached (GIMP_ITEM (parent)), FALSE);
@ -297,7 +297,7 @@ gimp_vectors_import (GimpImage *image,
gsize len, gsize len,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error) GError **error)
@ -334,7 +334,7 @@ gimp_vectors_import (GimpImage *image,
{ {
if (base->paths) if (base->paths)
{ {
GimpVectors *vectors = NULL; GimpPath *vectors = NULL;
base->paths = g_list_reverse (base->paths); base->paths = g_list_reverse (base->paths);

View file

@ -26,7 +26,7 @@ gboolean gimp_vectors_import_file (GimpImage *image,
GFile *file, GFile *file,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error); GError **error);
@ -35,7 +35,7 @@ gboolean gimp_vectors_import_buffer (GimpImage *image,
gsize len, gsize len,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
GimpVectors *parent, GimpPath *parent,
gint position, gint position,
GList **ret_vectors, GList **ret_vectors,
GError **error); GError **error);

View file

@ -29,8 +29,8 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimptempbuf.h" #include "core/gimptempbuf.h"
#include "gimppath.h"
#include "gimpstroke.h" #include "gimpstroke.h"
#include "gimpvectors.h"
#include "gimpvectors-preview.h" #include "gimpvectors-preview.h"
@ -42,14 +42,14 @@ gimp_vectors_get_new_preview (GimpViewable *viewable,
gint width, gint width,
gint height) gint height)
{ {
GimpVectors *vectors; GimpPath *vectors;
GimpItem *item; GimpItem *item;
GimpStroke *cur_stroke; GimpStroke *cur_stroke;
gdouble xscale, yscale; gdouble xscale, yscale;
guchar *data; guchar *data;
GimpTempBuf *temp_buf; GimpTempBuf *temp_buf;
vectors = GIMP_VECTORS (viewable); vectors = GIMP_PATH (viewable);
item = GIMP_ITEM (viewable); item = GIMP_ITEM (viewable);
xscale = ((gdouble) width) / gimp_image_get_width (gimp_item_get_image (item)); xscale = ((gdouble) width) / gimp_image_get_width (gimp_item_get_image (item));

View file

@ -31,8 +31,8 @@
#include "core/gimpcoords.h" #include "core/gimpcoords.h"
#include "gimpanchor.h" #include "gimpanchor.h"
#include "gimppath.h"
#include "gimpstroke.h" #include "gimpstroke.h"
#include "gimpvectors.h"
#include "gimpvectors-warp.h" #include "gimpvectors-warp.h"
@ -47,16 +47,16 @@ static void gimp_stroke_warp_point (GimpStroke *stroke,
gdouble y_offset, gdouble y_offset,
gdouble x_len); gdouble x_len);
static void gimp_vectors_warp_stroke (GimpVectors *vectors, static void gimp_vectors_warp_stroke (GimpPath *vectors,
GimpStroke *stroke, GimpStroke *stroke,
gdouble y_offset); gdouble y_offset);
void void
gimp_vectors_warp_point (GimpVectors *vectors, gimp_vectors_warp_point (GimpPath *vectors,
GimpCoords *point, GimpCoords *point,
GimpCoords *point_warped, GimpCoords *point_warped,
gdouble y_offset) gdouble y_offset)
{ {
gdouble x = point->x; gdouble x = point->x;
gdouble y = point->y; gdouble y = point->y;
@ -176,9 +176,9 @@ gimp_stroke_warp_point (GimpStroke *stroke,
} }
static void static void
gimp_vectors_warp_stroke (GimpVectors *vectors, gimp_vectors_warp_stroke (GimpPath *vectors,
GimpStroke *stroke, GimpStroke *stroke,
gdouble y_offset) gdouble y_offset)
{ {
GList *list; GList *list;
@ -193,9 +193,9 @@ gimp_vectors_warp_stroke (GimpVectors *vectors,
} }
void void
gimp_vectors_warp_vectors (GimpVectors *vectors, gimp_vectors_warp_vectors (GimpPath *vectors,
GimpVectors *vectors_in, GimpPath *vectors_in,
gdouble y_offset) gdouble y_offset)
{ {
GList *list; GList *list;

View file

@ -22,14 +22,14 @@
#define __GIMP_VECTORS_WARP_H__ #define __GIMP_VECTORS_WARP_H__
void gimp_vectors_warp_point (GimpVectors *vectors, void gimp_vectors_warp_point (GimpPath *vectors,
GimpCoords *point, GimpCoords *point,
GimpCoords *point_warped, GimpCoords *point_warped,
gdouble y_offset); gdouble y_offset);
void gimp_vectors_warp_vectors (GimpVectors *vectors, void gimp_vectors_warp_vectors (GimpPath *vectors,
GimpVectors *vectors_in, GimpPath *vectors_in,
gdouble yoffset); gdouble yoffset);
#endif /* __GIMP_VECTORS_WARP_H__ */ #endif /* __GIMP_VECTORS_WARP_H__ */

View file

@ -22,7 +22,7 @@
#include "vectors-types.h" #include "vectors-types.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpvectorsmodundo.h" #include "gimpvectorsmodundo.h"
@ -67,17 +67,17 @@ static void
gimp_vectors_mod_undo_constructed (GObject *object) gimp_vectors_mod_undo_constructed (GObject *object)
{ {
GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (object); GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (object);
GimpVectors *vectors; GimpPath *vectors;
G_OBJECT_CLASS (parent_class)->constructed (object); G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item)); gimp_assert (GIMP_IS_PATH (GIMP_ITEM_UNDO (object)->item));
vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (object)->item); vectors = GIMP_PATH (GIMP_ITEM_UNDO (object)->item);
vectors_mod_undo->vectors = vectors_mod_undo->vectors =
GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors), GIMP_PATH (gimp_item_duplicate (GIMP_ITEM (vectors),
G_TYPE_FROM_INSTANCE (vectors))); G_TYPE_FROM_INSTANCE (vectors)));
} }
static gint64 static gint64
@ -100,8 +100,8 @@ gimp_vectors_mod_undo_pop (GimpUndo *undo,
GimpUndoAccumulator *accum) GimpUndoAccumulator *accum)
{ {
GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (undo); GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (undo);
GimpVectors *vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (undo)->item); GimpPath *vectors = GIMP_PATH (GIMP_ITEM_UNDO (undo)->item);
GimpVectors *temp; GimpPath *temp;
gint offset_x; gint offset_x;
gint offset_y; gint offset_y;
@ -110,8 +110,8 @@ gimp_vectors_mod_undo_pop (GimpUndo *undo,
temp = vectors_mod_undo->vectors; temp = vectors_mod_undo->vectors;
vectors_mod_undo->vectors = vectors_mod_undo->vectors =
GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors), GIMP_PATH (gimp_item_duplicate (GIMP_ITEM (vectors),
G_TYPE_FROM_INSTANCE (vectors))); G_TYPE_FROM_INSTANCE (vectors)));
gimp_vectors_freeze (vectors); gimp_vectors_freeze (vectors);

View file

@ -37,7 +37,7 @@ struct _GimpVectorsModUndo
{ {
GimpItemUndo parent_instance; GimpItemUndo parent_instance;
GimpVectors *vectors; GimpPath *vectors;
}; };
struct _GimpVectorsModUndoClass struct _GimpVectorsModUndoClass

View file

@ -24,7 +24,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpvectorspropundo.h" #include "gimpvectorspropundo.h"
@ -63,9 +63,9 @@ gimp_vectors_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object); G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item)); gimp_assert (GIMP_IS_PATH (GIMP_ITEM_UNDO (object)->item));
/* vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (object)->item); */ /* vectors = GIMP_PATH (GIMP_ITEM_UNDO (object)->item); */
switch (GIMP_UNDO (object)->undo_type) switch (GIMP_UNDO (object)->undo_type)
{ {
@ -81,7 +81,7 @@ gimp_vectors_prop_undo_pop (GimpUndo *undo,
{ {
#if 0 #if 0
GimpVectorsPropUndo *vectors_prop_undo = GIMP_VECTORS_PROP_UNDO (undo); GimpVectorsPropUndo *vectors_prop_undo = GIMP_VECTORS_PROP_UNDO (undo);
GimpVectors *vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (undo)->item); GimpPath *vectors = GIMP_PATH (GIMP_ITEM_UNDO (undo)->item);
#endif #endif
GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum); GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);

View file

@ -26,7 +26,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "gimpvectors.h" #include "gimppath.h"
#include "gimpvectorsundo.h" #include "gimpvectorsundo.h"
@ -82,7 +82,7 @@ gimp_vectors_undo_class_init (GimpVectorsUndoClass *klass)
g_object_class_install_property (object_class, PROP_PREV_PARENT, g_object_class_install_property (object_class, PROP_PREV_PARENT,
g_param_spec_object ("prev-parent", g_param_spec_object ("prev-parent",
NULL, NULL, NULL, NULL,
GIMP_TYPE_VECTORS, GIMP_TYPE_PATH,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
@ -109,7 +109,7 @@ gimp_vectors_undo_constructed (GObject *object)
{ {
G_OBJECT_CLASS (parent_class)->constructed (object); G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item)); gimp_assert (GIMP_IS_PATH (GIMP_ITEM_UNDO (object)->item));
} }
static void static void
@ -195,7 +195,7 @@ gimp_vectors_undo_pop (GimpUndo *undo,
GimpUndoAccumulator *accum) GimpUndoAccumulator *accum)
{ {
GimpVectorsUndo *vectors_undo = GIMP_VECTORS_UNDO (undo); GimpVectorsUndo *vectors_undo = GIMP_VECTORS_UNDO (undo);
GimpVectors *path = GIMP_VECTORS (GIMP_ITEM_UNDO (undo)->item); GimpPath *path = GIMP_PATH (GIMP_ITEM_UNDO (undo)->item);
GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum); GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);

View file

@ -37,7 +37,7 @@ struct _GimpVectorsUndo
{ {
GimpItemUndo parent_instance; GimpItemUndo parent_instance;
GimpVectors *prev_parent; GimpPath *prev_parent;
gint prev_position; /* former position in list */ gint prev_position; /* former position in list */
GList *prev_vectors; /* previous selected vectors */ GList *prev_vectors; /* previous selected vectors */
}; };

View file

@ -1,6 +1,7 @@
libappvectors_sources = [ libappvectors_sources = [
'gimpanchor.c', 'gimpanchor.c',
'gimpbezierstroke.c', 'gimpbezierstroke.c',
'gimppath.c',
'gimpstroke-new.c', 'gimpstroke-new.c',
'gimpstroke.c', 'gimpstroke.c',
'gimpvectors-compat.c', 'gimpvectors-compat.c',
@ -8,7 +9,6 @@ libappvectors_sources = [
'gimpvectors-import.c', 'gimpvectors-import.c',
'gimpvectors-preview.c', 'gimpvectors-preview.c',
'gimpvectors-warp.c', 'gimpvectors-warp.c',
'gimpvectors.c',
'gimpvectorsmodundo.c', 'gimpvectorsmodundo.c',
'gimpvectorspropundo.c', 'gimpvectorspropundo.c',
'gimpvectorsundo.c', 'gimpvectorsundo.c',

View file

@ -29,7 +29,7 @@
typedef struct _GimpAnchor GimpAnchor; typedef struct _GimpAnchor GimpAnchor;
typedef struct _GimpVectors GimpVectors; typedef struct _GimpPath GimpPath;
typedef struct _GimpStroke GimpStroke; typedef struct _GimpStroke GimpStroke;
typedef struct _GimpBezierStroke GimpBezierStroke; typedef struct _GimpBezierStroke GimpBezierStroke;

View file

@ -47,7 +47,7 @@
#include "text/gimpfont.h" #include "text/gimpfont.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimpdnd.h" #include "gimpdnd.h"
#include "gimpdnd-xds.h" #include "gimpdnd-xds.h"
@ -476,7 +476,7 @@ static const GimpDndDataDef dnd_data_defs[] =
}, },
{ {
GIMP_TARGET_VECTORS, GIMP_TARGET_PATH,
"gimp-dnd-get-vectors-func", "gimp-dnd-get-vectors-func",
"gimp-dnd-get-vectors-data", "gimp-dnd-get-vectors-data",
@ -658,7 +658,7 @@ static const GimpDndDataDef dnd_data_defs[] =
}, },
{ {
GIMP_TARGET_VECTORS_LIST, GIMP_TARGET_PATH_LIST,
"gimp-dnd-get-vectors-list-func", "gimp-dnd-get-vectors-list-func",
"gimp-dnd-get-vectors-list-data", "gimp-dnd-get-vectors-list-data",
@ -1948,7 +1948,7 @@ gimp_dnd_data_type_get_by_g_type (GType type,
{ {
dnd_type = list ? GIMP_DND_TYPE_CHANNEL_LIST : GIMP_DND_TYPE_CHANNEL; dnd_type = list ? GIMP_DND_TYPE_CHANNEL_LIST : GIMP_DND_TYPE_CHANNEL;
} }
else if (g_type_is_a (type, GIMP_TYPE_VECTORS)) else if (g_type_is_a (type, GIMP_TYPE_PATH))
{ {
dnd_type = list ? GIMP_DND_TYPE_VECTORS_LIST : GIMP_DND_TYPE_VECTORS; dnd_type = list ? GIMP_DND_TYPE_VECTORS_LIST : GIMP_DND_TYPE_VECTORS;
} }

View file

@ -61,7 +61,7 @@
#define GIMP_TARGET_LAYER_MASK \ #define GIMP_TARGET_LAYER_MASK \
{ "application/x-gimp-layer-mask-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_MASK } { "application/x-gimp-layer-mask-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_MASK }
#define GIMP_TARGET_VECTORS \ #define GIMP_TARGET_PATH \
{ "application/x-gimp-vectors-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS } { "application/x-gimp-vectors-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS }
#define GIMP_TARGET_BRUSH \ #define GIMP_TARGET_BRUSH \
@ -100,7 +100,7 @@
#define GIMP_TARGET_CHANNEL_LIST \ #define GIMP_TARGET_CHANNEL_LIST \
{ "application/x-gimp-channel-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_CHANNEL_LIST } { "application/x-gimp-channel-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_CHANNEL_LIST }
#define GIMP_TARGET_VECTORS_LIST \ #define GIMP_TARGET_PATH_LIST \
{ "application/x-gimp-vectors-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS_LIST } { "application/x-gimp-vectors-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS_LIST }
/* dnd initialization */ /* dnd initialization */

View file

@ -56,7 +56,7 @@
#include "core/gimptreehandler.h" #include "core/gimptreehandler.h"
#include "core/gimpundostack.h" #include "core/gimpundostack.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimpaction.h" #include "gimpaction.h"
#include "gimpcontainertreestore.h" #include "gimpcontainertreestore.h"

View file

@ -34,7 +34,7 @@
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectors-export.h" #include "vectors/gimpvectors-export.h"
#include "vectors/gimpvectors-import.h" #include "vectors/gimpvectors-import.h"
@ -87,7 +87,7 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
view_class->drop_svg = gimp_vectors_tree_view_drop_svg; view_class->drop_svg = gimp_vectors_tree_view_drop_svg;
iv_class->item_type = GIMP_TYPE_VECTORS; iv_class->item_type = GIMP_TYPE_PATH;
iv_class->signal_name = "selected-paths-changed"; iv_class->signal_name = "selected-paths-changed";
iv_class->get_container = gimp_image_get_paths; iv_class->get_container = gimp_image_get_paths;
@ -156,7 +156,7 @@ gimp_vectors_tree_view_constructed (GObject *object)
NULL); NULL);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor), gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->toselection_button), GTK_BUTTON (view->toselection_button),
GIMP_TYPE_VECTORS); GIMP_TYPE_PATH);
gtk_box_reorder_child (gimp_editor_get_button_box (editor), gtk_box_reorder_child (gimp_editor_get_button_box (editor),
view->toselection_button, 4); view->toselection_button, 4);
@ -177,7 +177,7 @@ gimp_vectors_tree_view_constructed (GObject *object)
NULL); NULL);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor), gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->stroke_button), GTK_BUTTON (view->stroke_button),
GIMP_TYPE_VECTORS); GIMP_TYPE_PATH);
gtk_box_reorder_child (gimp_editor_get_button_box (editor), gtk_box_reorder_child (gimp_editor_get_button_box (editor),
view->stroke_button, 6); view->stroke_button, 6);
@ -217,7 +217,7 @@ gimp_vectors_tree_view_drop_svg (GimpContainerTreeView *tree_view,
{ {
GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (tree_view); GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (tree_view);
GimpImage *image = gimp_item_tree_view_get_image (item_view); GimpImage *image = gimp_item_tree_view_get_image (item_view);
GimpVectors *parent; GimpPath *parent;
gint index; gint index;
GError *error = NULL; GError *error = NULL;
@ -245,7 +245,7 @@ gimp_vectors_tree_view_drop_svg (GimpContainerTreeView *tree_view,
static GimpItem * static GimpItem *
gimp_vectors_tree_view_item_new (GimpImage *image) gimp_vectors_tree_view_item_new (GimpImage *image)
{ {
GimpVectors *new_path; GimpPath *new_path;
new_path = gimp_vectors_new (image, _("Path")); new_path = gimp_vectors_new (image, _("Path"));

View file

@ -35,7 +35,7 @@
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimppalette.h" #include "core/gimppalette.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "gimpviewrenderer-utils.h" #include "gimpviewrenderer-utils.h"
#include "gimpviewrendererbrush.h" #include "gimpviewrendererbrush.h"
@ -81,7 +81,7 @@ gimp_view_renderer_type_from_viewable_type (GType viewable_type)
{ {
type = GIMP_TYPE_VIEW_RENDERER_GRADIENT; type = GIMP_TYPE_VIEW_RENDERER_GRADIENT;
} }
else if (g_type_is_a (viewable_type, GIMP_TYPE_VECTORS)) else if (g_type_is_a (viewable_type, GIMP_TYPE_PATH))
{ {
type = GIMP_TYPE_VIEW_RENDERER_VECTORS; type = GIMP_TYPE_VIEW_RENDERER_VECTORS;
} }

View file

@ -32,8 +32,8 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpitem.h" #include "core/gimpitem.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "gimpviewrenderervectors.h" #include "gimpviewrenderervectors.h"
@ -71,7 +71,7 @@ gimp_view_renderer_vectors_draw (GimpViewRenderer *renderer,
gint available_width, gint available_width,
gint available_height) gint available_height)
{ {
GimpVectors *vectors = GIMP_VECTORS (renderer->viewable); GimpPath *vectors = GIMP_PATH (renderer->viewable);
const GimpBezierDesc *desc; const GimpBezierDesc *desc;
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);

View file

@ -72,7 +72,7 @@
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpstroke.h" #include "vectors/gimpstroke.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpvectors-compat.h" #include "vectors/gimpvectors-compat.h"
#include "xcf-private.h" #include "xcf-private.h"
@ -136,7 +136,7 @@ static gboolean xcf_load_effect_props (XcfInfo *info,
FilterData *filter); FilterData *filter);
static gboolean xcf_load_path_props (XcfInfo *info, static gboolean xcf_load_path_props (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors **vectors); GimpPath **vectors);
static gboolean xcf_load_prop (XcfInfo *info, static gboolean xcf_load_prop (XcfInfo *info,
PropType *prop_type, PropType *prop_type,
guint32 *prop_size); guint32 *prop_size);
@ -150,7 +150,7 @@ static FilterData * xcf_load_effect (XcfInfo *info,
GimpDrawable *drawable); GimpDrawable *drawable);
static void xcf_load_free_effect (FilterData *data); static void xcf_load_free_effect (FilterData *data);
static void xcf_load_free_effects (GList *effects); static void xcf_load_free_effects (GList *effects);
static GimpVectors * xcf_load_path (XcfInfo *info, static GimpPath * xcf_load_path (XcfInfo *info,
GimpImage *image); GimpImage *image);
static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info, static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info,
GimpImage *image); GimpImage *image);
@ -822,7 +822,7 @@ xcf_load_image (Gimp *gimp,
{ {
while (TRUE) while (TRUE)
{ {
GimpVectors *vectors; GimpPath *vectors;
/* read in the offset of the next path */ /* read in the offset of the next path */
xcf_read_offset (info, &offset, 1); xcf_read_offset (info, &offset, 1);
@ -933,7 +933,7 @@ xcf_load_image (Gimp *gimp,
#if 0 #if 0
GimpItemList *set; GimpItemList *set;
set = gimp_item_list_named_new (image, GIMP_TYPE_VECTORS, set = gimp_item_list_named_new (image, GIMP_TYPE_PATH,
_("Linked Paths"), _("Linked Paths"),
info->linked_paths); info->linked_paths);
gimp_image_store_item_set (image, set); gimp_image_store_item_set (image, set);
@ -2743,9 +2743,9 @@ set_or_seek_node_property:
} }
static gboolean static gboolean
xcf_load_path_props (XcfInfo *info, xcf_load_path_props (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors **vectors) GimpPath **vectors)
{ {
PropType prop_type; PropType prop_type;
guint32 prop_size; guint32 prop_size;
@ -3410,17 +3410,17 @@ xcf_load_free_effects (GList *effects)
} }
/* The new path structure since XCF 18. */ /* The new path structure since XCF 18. */
static GimpVectors * static GimpPath *
xcf_load_path (XcfInfo *info, xcf_load_path (XcfInfo *info,
GimpImage *image) GimpImage *image)
{ {
GimpVectors *vectors = NULL; GimpPath *vectors = NULL;
gchar *name; gchar *name;
guint32 version; guint32 version;
guint32 plength; guint32 plength;
guint32 num_strokes; guint32 num_strokes;
goffset base; goffset base;
gint i; gint i;
/* read in the path name. */ /* read in the path name. */
xcf_read_string (info, &name, 1); xcf_read_string (info, &name, 1);
@ -4193,9 +4193,9 @@ static gboolean
xcf_load_old_paths (XcfInfo *info, xcf_load_old_paths (XcfInfo *info,
GimpImage *image) GimpImage *image)
{ {
guint32 num_paths; guint32 num_paths;
guint32 last_selected_row; guint32 last_selected_row;
GimpVectors *active_vectors; GimpPath *active_vectors;
xcf_read_int32 (info, &last_selected_row, 1); xcf_read_int32 (info, &last_selected_row, 1);
xcf_read_int32 (info, &num_paths, 1); xcf_read_int32 (info, &num_paths, 1);
@ -4207,7 +4207,7 @@ xcf_load_old_paths (XcfInfo *info,
return FALSE; return FALSE;
active_vectors = active_vectors =
GIMP_VECTORS (gimp_container_get_child_by_index (gimp_image_get_paths (image), GIMP_PATH (gimp_container_get_child_by_index (gimp_image_get_paths (image),
last_selected_row)); last_selected_row));
if (active_vectors) if (active_vectors)
@ -4231,7 +4231,7 @@ xcf_load_old_path (XcfInfo *info,
guint32 num_points; guint32 num_points;
guint32 version; /* changed from num_paths */ guint32 version; /* changed from num_paths */
GimpTattoo tattoo = 0; GimpTattoo tattoo = 0;
GimpVectors *vectors; GimpPath *vectors;
GimpVectorsCompatPoint *points; GimpVectorsCompatPoint *points;
gint i; gint i;
@ -4326,10 +4326,10 @@ static gboolean
xcf_load_old_vectors (XcfInfo *info, xcf_load_old_vectors (XcfInfo *info,
GimpImage *image) GimpImage *image)
{ {
guint32 version; guint32 version;
guint32 active_index; guint32 active_index;
guint32 num_paths; guint32 num_paths;
GimpVectors *active_vectors; GimpPath *active_vectors;
#ifdef GIMP_XCF_PATH_DEBUG #ifdef GIMP_XCF_PATH_DEBUG
g_printerr ("xcf_load_old_vectors\n"); g_printerr ("xcf_load_old_vectors\n");
@ -4358,8 +4358,8 @@ xcf_load_old_vectors (XcfInfo *info,
/* FIXME tree */ /* FIXME tree */
active_vectors = active_vectors =
GIMP_VECTORS (gimp_container_get_child_by_index (gimp_image_get_paths (image), GIMP_PATH (gimp_container_get_child_by_index (gimp_image_get_paths (image),
active_index)); active_index));
if (active_vectors) if (active_vectors)
{ {
@ -4378,14 +4378,14 @@ static gboolean
xcf_load_old_vector (XcfInfo *info, xcf_load_old_vector (XcfInfo *info,
GimpImage *image) GimpImage *image)
{ {
gchar *name; gchar *name;
GimpTattoo tattoo = 0; GimpTattoo tattoo = 0;
guint32 visible; guint32 visible;
guint32 linked; guint32 linked;
guint32 num_parasites; guint32 num_parasites;
guint32 num_strokes; guint32 num_strokes;
GimpVectors *vectors; GimpPath *vectors;
gint i; gint i;
#ifdef GIMP_XCF_PATH_DEBUG #ifdef GIMP_XCF_PATH_DEBUG
g_printerr ("xcf_load_old_vector\n"); g_printerr ("xcf_load_old_vector\n");

View file

@ -66,9 +66,9 @@
#include "text/gimptextlayer-xcf.h" #include "text/gimptextlayer-xcf.h"
#include "vectors/gimpanchor.h" #include "vectors/gimpanchor.h"
#include "vectors/gimpstroke.h"
#include "vectors/gimpbezierstroke.h" #include "vectors/gimpbezierstroke.h"
#include "vectors/gimpvectors.h" #include "vectors/gimppath.h"
#include "vectors/gimpstroke.h"
#include "vectors/gimpvectors-compat.h" #include "vectors/gimpvectors-compat.h"
#include "xcf-private.h" #include "xcf-private.h"
@ -124,7 +124,7 @@ static gboolean xcf_save_effect_props (XcfInfo *info,
GError **error); GError **error);
static gboolean xcf_save_path_props (XcfInfo *info, static gboolean xcf_save_path_props (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GError **error); GError **error);
static gboolean xcf_save_prop (XcfInfo *info, static gboolean xcf_save_prop (XcfInfo *info,
GimpImage *image, GimpImage *image,
@ -145,7 +145,7 @@ static gboolean xcf_save_effect (XcfInfo *info,
GError **error); GError **error);
static gboolean xcf_save_path (XcfInfo *info, static gboolean xcf_save_path (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GError **error); GError **error);
static gboolean xcf_save_buffer (XcfInfo *info, static gboolean xcf_save_buffer (XcfInfo *info,
GimpImage *image, GimpImage *image,
@ -435,7 +435,7 @@ xcf_save_image (XcfInfo *info,
for (list = all_paths; list; list = g_list_next (list)) for (list = all_paths; list; list = g_list_next (list))
{ {
GimpVectors *vectors = list->data; GimpPath *vectors = list->data;
/* seek back to the next slot in the offset table and write the /* seek back to the next slot in the offset table and write the
* offset of the channel * offset of the channel
@ -941,7 +941,7 @@ xcf_save_effect_props (XcfInfo *info,
static gboolean static gboolean
xcf_save_path_props (XcfInfo *info, xcf_save_path_props (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GError **error) GError **error)
{ {
GimpParasiteList *parasites; GimpParasiteList *parasites;
@ -1706,7 +1706,7 @@ xcf_save_prop (XcfInfo *info,
item_type = 0; item_type = 0;
else if (gimp_item_list_get_item_type (set) == GIMP_TYPE_CHANNEL) else if (gimp_item_list_get_item_type (set) == GIMP_TYPE_CHANNEL)
item_type = 1; item_type = 1;
else if (gimp_item_list_get_item_type (set) == GIMP_TYPE_VECTORS) else if (gimp_item_list_get_item_type (set) == GIMP_TYPE_PATH)
item_type = 2; item_type = 2;
else else
g_return_val_if_reached (FALSE); g_return_val_if_reached (FALSE);
@ -2897,11 +2897,11 @@ xcf_save_old_paths (XcfInfo *info,
GimpImage *image, GimpImage *image,
GError **error) GError **error)
{ {
GimpVectors *active_path = NULL; GimpPath *active_path = NULL;
guint32 num_paths; guint32 num_paths;
guint32 active_index = 0; guint32 active_index = 0;
GList *list; GList *list;
GError *tmp_error = NULL; GError *tmp_error = NULL;
/* Write out the following:- /* Write out the following:-
* *
@ -2935,7 +2935,7 @@ xcf_save_old_paths (XcfInfo *info,
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {
GimpVectors *vectors = list->data; GimpPath *vectors = list->data;
gchar *name; gchar *name;
guint32 locked; guint32 locked;
guint8 state; guint8 state;
@ -3019,13 +3019,13 @@ xcf_save_old_vectors (XcfInfo *info,
GimpImage *image, GimpImage *image,
GError **error) GError **error)
{ {
GimpVectors *active_path = NULL; GimpPath *active_path = NULL;
guint32 version = 1; guint32 version = 1;
guint32 active_index = 0; guint32 active_index = 0;
guint32 num_paths; guint32 num_paths;
GList *list; GList *list;
GList *stroke_list; GList *stroke_list;
GError *tmp_error = NULL; GError *tmp_error = NULL;
/* Write out the following:- /* Write out the following:-
* *
@ -3061,7 +3061,7 @@ xcf_save_old_vectors (XcfInfo *info,
list; list;
list = g_list_next (list)) list = g_list_next (list))
{ {
GimpVectors *vectors = list->data; GimpPath *vectors = list->data;
GimpParasiteList *parasites; GimpParasiteList *parasites;
const gchar *name; const gchar *name;
guint32 tattoo; guint32 tattoo;
@ -3182,7 +3182,7 @@ xcf_save_old_vectors (XcfInfo *info,
static gboolean static gboolean
xcf_save_path (XcfInfo *info, xcf_save_path (XcfInfo *info,
GimpImage *image, GimpImage *image,
GimpVectors *vectors, GimpPath *vectors,
GError **error) GError **error)
{ {
const gchar *string; const gchar *string;

View file

@ -438,7 +438,7 @@ gimp_main (GType plug_in_type,
GIMP_TYPE_CHANNEL, GIMP_TYPE_PARAM_CHANNEL, GIMP_TYPE_CHANNEL, GIMP_TYPE_PARAM_CHANNEL,
GIMP_TYPE_LAYER_MASK, GIMP_TYPE_PARAM_LAYER_MASK, GIMP_TYPE_LAYER_MASK, GIMP_TYPE_PARAM_LAYER_MASK,
GIMP_TYPE_SELECTION, GIMP_TYPE_PARAM_SELECTION, GIMP_TYPE_SELECTION, GIMP_TYPE_PARAM_SELECTION,
GIMP_TYPE_VECTORS, GIMP_TYPE_PARAM_VECTORS, GIMP_TYPE_PATH, GIMP_TYPE_PARAM_PATH,
GIMP_TYPE_BRUSH, GIMP_TYPE_PARAM_BRUSH, GIMP_TYPE_BRUSH, GIMP_TYPE_PARAM_BRUSH,
GIMP_TYPE_FONT, GIMP_TYPE_PARAM_FONT, GIMP_TYPE_FONT, GIMP_TYPE_PARAM_FONT,

View file

@ -685,6 +685,7 @@ EXPORTS
gimp_param_layer_get_type gimp_param_layer_get_type
gimp_param_layer_mask_get_type gimp_param_layer_mask_get_type
gimp_param_palette_get_type gimp_param_palette_get_type
gimp_param_path_get_type
gimp_param_pattern_get_type gimp_param_pattern_get_type
gimp_param_resource_get_type gimp_param_resource_get_type
gimp_param_selection_get_type gimp_param_selection_get_type
@ -701,13 +702,12 @@ EXPORTS
gimp_param_spec_layer gimp_param_spec_layer
gimp_param_spec_layer_mask gimp_param_spec_layer_mask
gimp_param_spec_palette gimp_param_spec_palette
gimp_param_spec_path
gimp_param_spec_pattern gimp_param_spec_pattern
gimp_param_spec_resource gimp_param_spec_resource
gimp_param_spec_selection gimp_param_spec_selection
gimp_param_spec_text_layer gimp_param_spec_text_layer
gimp_param_spec_vectors
gimp_param_text_layer_get_type gimp_param_text_layer_get_type
gimp_param_vectors_get_type
gimp_path_bezier_stroke_conicto gimp_path_bezier_stroke_conicto
gimp_path_bezier_stroke_cubicto gimp_path_bezier_stroke_cubicto
gimp_path_bezier_stroke_lineto gimp_path_bezier_stroke_lineto
@ -716,7 +716,9 @@ EXPORTS
gimp_path_copy gimp_path_copy
gimp_path_export_to_file gimp_path_export_to_file
gimp_path_export_to_string gimp_path_export_to_string
gimp_path_get_by_id
gimp_path_get_strokes gimp_path_get_strokes
gimp_path_get_type
gimp_path_import_from_file gimp_path_import_from_file
gimp_path_import_from_string gimp_path_import_from_string
gimp_path_new gimp_path_new
@ -1018,7 +1020,5 @@ EXPORTS
gimp_vector_load_procedure_extract_dimensions gimp_vector_load_procedure_extract_dimensions
gimp_vector_load_procedure_get_type gimp_vector_load_procedure_get_type
gimp_vector_load_procedure_new gimp_vector_load_procedure_new
gimp_vectors_get_by_id
gimp_vectors_get_type
gimp_version gimp_version
gimp_wm_class gimp_wm_class

View file

@ -57,6 +57,7 @@
#include <libgimp/gimploadprocedure.h> #include <libgimp/gimploadprocedure.h>
#include <libgimp/gimppalette.h> #include <libgimp/gimppalette.h>
#include <libgimp/gimpparamspecs.h> #include <libgimp/gimpparamspecs.h>
#include <libgimp/gimppath.h>
#include <libgimp/gimppattern.h> #include <libgimp/gimppattern.h>
#include <libgimp/gimppdb.h> #include <libgimp/gimppdb.h>
#include <libgimp/gimpplugin.h> #include <libgimp/gimpplugin.h>
@ -68,7 +69,6 @@
#include <libgimp/gimptextlayer.h> #include <libgimp/gimptextlayer.h>
#include <libgimp/gimpthumbnailprocedure.h> #include <libgimp/gimpthumbnailprocedure.h>
#include <libgimp/gimpvectorloadprocedure.h> #include <libgimp/gimpvectorloadprocedure.h>
#include <libgimp/gimpvectors.h>
/* Resources and their widgets. Order important. */ /* Resources and their widgets. Order important. */
#include <libgimp/gimpresourceselect.h> #include <libgimp/gimpresourceselect.h>

View file

@ -258,10 +258,10 @@ _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
param_def->meta.m_id.none_ok, param_def->meta.m_id.none_ok,
flags); flags);
if (! strcmp (param_def->type_name, "GimpParamVectors")) if (! strcmp (param_def->type_name, "GimpParamPath"))
return gimp_param_spec_vectors (name, nick, blurb, return gimp_param_spec_path (name, nick, blurb,
param_def->meta.m_id.none_ok, param_def->meta.m_id.none_ok,
flags); flags);
if (! strcmp (param_def->type_name, "GimpParamResource")) if (! strcmp (param_def->type_name, "GimpParamResource"))
return gimp_param_spec_resource (name, nick, blurb, return gimp_param_spec_resource (name, nick, blurb,
@ -546,9 +546,9 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
{ {
type_name = "GimpParamSelection"; type_name = "GimpParamSelection";
} }
else if (value_type == GIMP_TYPE_VECTORS) else if (value_type == GIMP_TYPE_PATH)
{ {
type_name = "GimpParamVectors"; type_name = "GimpParamPath";
} }
else if (value_type == GIMP_TYPE_RESOURCE) else if (value_type == GIMP_TYPE_RESOURCE)
{ {

View file

@ -397,7 +397,7 @@ gimp_image_take_selected_channels (GimpImage *image,
* This procedure returns the list of paths selected in the specified * This procedure returns the list of paths selected in the specified
* image. * image.
* *
* Returns: (element-type GimpVectors) (transfer container): * Returns: (element-type GimpPath) (transfer container):
* The list of selected paths in the image. * The list of selected paths in the image.
* The returned list must be freed with g_list_free(). * The returned list must be freed with g_list_free().
* Path elements belong to libgimp and must not be freed. * Path elements belong to libgimp and must not be freed.
@ -407,10 +407,10 @@ gimp_image_take_selected_channels (GimpImage *image,
GList * GList *
gimp_image_list_selected_paths (GimpImage *image) gimp_image_list_selected_paths (GimpImage *image)
{ {
GimpVectors **paths; GimpPath **paths;
gint num_paths; gint num_paths;
GList *list = NULL; GList *list = NULL;
gint i; gint i;
paths = gimp_image_get_selected_paths (image, &num_paths); paths = gimp_image_get_selected_paths (image, &num_paths);
@ -425,7 +425,7 @@ gimp_image_list_selected_paths (GimpImage *image)
/** /**
* gimp_image_take_selected_paths: * gimp_image_take_selected_paths:
* @image: The image. * @image: The image.
* @paths: (transfer container) (element-type GimpVectors): The list of paths to select. * @paths: (transfer container) (element-type GimpPath): The list of paths to select.
* *
* The paths are set as the selected paths in the image. Any previous * The paths are set as the selected paths in the image. Any previous
* selected paths are unselected. * selected paths are unselected.
@ -438,17 +438,17 @@ gboolean
gimp_image_take_selected_paths (GimpImage *image, gimp_image_take_selected_paths (GimpImage *image,
GList *paths) GList *paths)
{ {
GimpVectors **sel_paths; GimpPath **sel_paths;
GList *list; GList *list;
gboolean success; gboolean success;
gint i; gint i;
sel_paths = g_new0 (GimpVectors *, g_list_length (paths)); sel_paths = g_new0 (GimpPath *, g_list_length (paths));
for (list = paths, i = 0; list; list = list->next, i++) for (list = paths, i = 0; list; list = list->next, i++)
sel_paths[i] = list->data; sel_paths[i] = list->data;
success = gimp_image_set_selected_paths (image, g_list_length (paths), success = gimp_image_set_selected_paths (image, g_list_length (paths),
(const GimpVectors **) sel_paths); (const GimpPath **) sel_paths);
g_list_free (paths); g_list_free (paths);
return success; return success;
@ -500,7 +500,7 @@ gimp_image_list_channels (GimpImage *image)
* This procedure returns the list of paths contained in the * This procedure returns the list of paths contained in the
* specified image. * specified image.
* *
* Returns: (element-type GimpVectors) (transfer container): * Returns: (element-type GimpPath) (transfer container):
* The list of paths contained in the image. * The list of paths contained in the image.
* The returned value must be freed with g_list_free(). Path * The returned value must be freed with g_list_free(). Path
* elements belong to libgimp and must not be freed. * elements belong to libgimp and must not be freed.
@ -510,10 +510,10 @@ gimp_image_list_channels (GimpImage *image)
GList * GList *
gimp_image_list_paths (GimpImage *image) gimp_image_list_paths (GimpImage *image)
{ {
GimpVectors **paths; GimpPath **paths;
gint num_paths; gint num_paths;
GList *list = NULL; GList *list = NULL;
gint i; gint i;
paths = gimp_image_get_paths (image, &num_paths); paths = gimp_image_get_paths (image, &num_paths);

View file

@ -569,19 +569,19 @@ gimp_image_get_channels (GimpImage *image,
* This procedure returns the list of paths contained in the specified * This procedure returns the list of paths contained in the specified
* image. * image.
* *
* Returns: (array length=num_paths) (element-type GimpVectors) (transfer container): * Returns: (array length=num_paths) (element-type GimpPath) (transfer container):
* The list of paths contained in the image. * The list of paths contained in the image.
* The returned value must be freed with g_free(). * The returned value must be freed with g_free().
* *
* Since: 2.4 * Since: 2.4
**/ **/
GimpVectors ** GimpPath **
gimp_image_get_paths (GimpImage *image, gimp_image_get_paths (GimpImage *image,
gint *num_paths) gint *num_paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors **paths = NULL; GimpPath **paths = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -1189,10 +1189,10 @@ gimp_image_thaw_channels (GimpImage *image)
* Returns: TRUE on success. * Returns: TRUE on success.
**/ **/
gboolean gboolean
gimp_image_insert_path (GimpImage *image, gimp_image_insert_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
GimpVectors *parent, GimpPath *parent,
gint position) gint position)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1200,8 +1200,8 @@ gimp_image_insert_path (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
GIMP_TYPE_VECTORS, parent, GIMP_TYPE_PATH, parent,
G_TYPE_INT, position, G_TYPE_INT, position,
G_TYPE_NONE); G_TYPE_NONE);
@ -1232,8 +1232,8 @@ gimp_image_insert_path (GimpImage *image,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_image_remove_path (GimpImage *image, gimp_image_remove_path (GimpImage *image,
GimpVectors *path) GimpPath *path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1241,7 +1241,7 @@ gimp_image_remove_path (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
@ -2220,19 +2220,19 @@ gimp_image_set_selected_channels (GimpImage *image,
* This procedure returns the list of selected paths in the specified * This procedure returns the list of selected paths in the specified
* image. * image.
* *
* Returns: (array length=num_paths) (element-type GimpVectors) (transfer container): * Returns: (array length=num_paths) (element-type GimpPath) (transfer container):
* The list of selected paths in the image. * The list of selected paths in the image.
* The returned value must be freed with g_free(). * The returned value must be freed with g_free().
* *
* Since: 3.0.0 * Since: 3.0.0
**/ **/
GimpVectors ** GimpPath **
gimp_image_get_selected_paths (GimpImage *image, gimp_image_get_selected_paths (GimpImage *image,
gint *num_paths) gint *num_paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors **paths = NULL; GimpPath **paths = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -2260,7 +2260,7 @@ gimp_image_get_selected_paths (GimpImage *image,
* gimp_image_set_selected_paths: * gimp_image_set_selected_paths:
* @image: The image. * @image: The image.
* @num_paths: The number of paths to select. * @num_paths: The number of paths to select.
* @paths: (array length=num_paths) (element-type GimpVectors): The list of paths to select. * @paths: (array length=num_paths) (element-type GimpPath): The list of paths to select.
* *
* Sets the specified image's selected paths. * Sets the specified image's selected paths.
* *
@ -2271,9 +2271,9 @@ gimp_image_get_selected_paths (GimpImage *image,
* Since: 3.0.0 * Since: 3.0.0
**/ **/
gboolean gboolean
gimp_image_set_selected_paths (GimpImage *image, gimp_image_set_selected_paths (GimpImage *image,
gint num_paths, gint num_paths,
const GimpVectors **paths) const GimpPath **paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -2284,7 +2284,7 @@ gimp_image_set_selected_paths (GimpImage *image,
G_TYPE_INT, num_paths, G_TYPE_INT, num_paths,
GIMP_TYPE_OBJECT_ARRAY, NULL, GIMP_TYPE_OBJECT_ARRAY, NULL,
G_TYPE_NONE); G_TYPE_NONE);
gimp_value_set_object_array (gimp_value_array_index (args, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths); gimp_value_set_object_array (gimp_value_array_index (args, 2), GIMP_TYPE_PATH, (GObject **) paths, num_paths);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-set-selected-paths", "gimp-image-set-selected-paths",
@ -3123,13 +3123,13 @@ gimp_image_get_channel_by_tattoo (GimpImage *image,
* *
* Since: 2.6 * Since: 2.6
**/ **/
GimpVectors * GimpPath *
gimp_image_get_path_by_tattoo (GimpImage *image, gimp_image_get_path_by_tattoo (GimpImage *image,
guint tattoo) guint tattoo)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path = NULL; GimpPath *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -3142,7 +3142,7 @@ gimp_image_get_path_by_tattoo (GimpImage *image,
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
path = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_PATH (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
@ -3243,13 +3243,13 @@ gimp_image_get_channel_by_name (GimpImage *image,
* *
* Since: 2.8 * Since: 2.8
**/ **/
GimpVectors * GimpPath *
gimp_image_get_path_by_name (GimpImage *image, gimp_image_get_path_by_name (GimpImage *image,
const gchar *name) const gchar *name)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path = NULL; GimpPath *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -3262,7 +3262,7 @@ gimp_image_get_path_by_name (GimpImage *image,
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
path = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_PATH (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -52,7 +52,7 @@ GimpLayer** gimp_image_get_layers (GimpImage
gint *num_layers); gint *num_layers);
GimpChannel** gimp_image_get_channels (GimpImage *image, GimpChannel** gimp_image_get_channels (GimpImage *image,
gint *num_channels); gint *num_channels);
GimpVectors** gimp_image_get_paths (GimpImage *image, GimpPath** gimp_image_get_paths (GimpImage *image,
gint *num_paths); gint *num_paths);
gboolean gimp_image_unset_active_channel (GimpImage *image); gboolean gimp_image_unset_active_channel (GimpImage *image);
GimpLayer* gimp_image_get_floating_sel (GimpImage *image); GimpLayer* gimp_image_get_floating_sel (GimpImage *image);
@ -86,11 +86,11 @@ gboolean gimp_image_remove_channel (GimpImage
gboolean gimp_image_freeze_channels (GimpImage *image); gboolean gimp_image_freeze_channels (GimpImage *image);
gboolean gimp_image_thaw_channels (GimpImage *image); gboolean gimp_image_thaw_channels (GimpImage *image);
gboolean gimp_image_insert_path (GimpImage *image, gboolean gimp_image_insert_path (GimpImage *image,
GimpVectors *path, GimpPath *path,
GimpVectors *parent, GimpPath *parent,
gint position); gint position);
gboolean gimp_image_remove_path (GimpImage *image, gboolean gimp_image_remove_path (GimpImage *image,
GimpVectors *path); GimpPath *path);
gboolean gimp_image_freeze_paths (GimpImage *image); gboolean gimp_image_freeze_paths (GimpImage *image);
gboolean gimp_image_thaw_paths (GimpImage *image); gboolean gimp_image_thaw_paths (GimpImage *image);
gint gimp_image_get_item_position (GimpImage *image, gint gimp_image_get_item_position (GimpImage *image,
@ -139,11 +139,11 @@ GimpChannel** gimp_image_get_selected_channels (GimpImage
gboolean gimp_image_set_selected_channels (GimpImage *image, gboolean gimp_image_set_selected_channels (GimpImage *image,
gint num_channels, gint num_channels,
const GimpChannel **channels); const GimpChannel **channels);
GimpVectors** gimp_image_get_selected_paths (GimpImage *image, GimpPath** gimp_image_get_selected_paths (GimpImage *image,
gint *num_paths); gint *num_paths);
gboolean gimp_image_set_selected_paths (GimpImage *image, gboolean gimp_image_set_selected_paths (GimpImage *image,
gint num_paths, gint num_paths,
const GimpVectors **paths); const GimpPath **paths);
GimpItem** gimp_image_get_selected_drawables (GimpImage *image, GimpItem** gimp_image_get_selected_drawables (GimpImage *image,
gint *num_drawables); gint *num_drawables);
GimpSelection* gimp_image_get_selection (GimpImage *image); GimpSelection* gimp_image_get_selection (GimpImage *image);
@ -180,13 +180,13 @@ GimpLayer* gimp_image_get_layer_by_tattoo (GimpImage
guint tattoo); guint tattoo);
GimpChannel* gimp_image_get_channel_by_tattoo (GimpImage *image, GimpChannel* gimp_image_get_channel_by_tattoo (GimpImage *image,
guint tattoo); guint tattoo);
GimpVectors* gimp_image_get_path_by_tattoo (GimpImage *image, GimpPath* gimp_image_get_path_by_tattoo (GimpImage *image,
guint tattoo); guint tattoo);
GimpLayer* gimp_image_get_layer_by_name (GimpImage *image, GimpLayer* gimp_image_get_layer_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpChannel* gimp_image_get_channel_by_name (GimpImage *image, GimpChannel* gimp_image_get_channel_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpVectors* gimp_image_get_path_by_name (GimpImage *image, GimpPath* gimp_image_get_path_by_name (GimpImage *image,
const gchar *name); const gchar *name);
gboolean gimp_image_attach_parasite (GimpImage *image, gboolean gimp_image_attach_parasite (GimpImage *image,
const GimpParasite *parasite); const GimpParasite *parasite);

View file

@ -799,14 +799,14 @@ gimp_param_spec_selection (const gchar *name,
/* /*
* GIMP_TYPE_PARAM_VECTORS * GIMP_TYPE_PARAM_PATH
*/ */
static void gimp_param_vectors_class_init (GParamSpecClass *klass); static void gimp_param_path_class_init (GParamSpecClass *klass);
static void gimp_param_vectors_init (GParamSpec *pspec); static void gimp_param_path_init (GParamSpec *pspec);
GType GType
gimp_param_vectors_get_type (void) gimp_param_path_get_type (void)
{ {
static GType type = 0; static GType type = 0;
@ -816,58 +816,58 @@ gimp_param_vectors_get_type (void)
{ {
sizeof (GParamSpecClass), sizeof (GParamSpecClass),
NULL, NULL, NULL, NULL,
(GClassInitFunc) gimp_param_vectors_class_init, (GClassInitFunc) gimp_param_path_class_init,
NULL, NULL, NULL, NULL,
sizeof (GimpParamSpecVectors), sizeof (GimpParamSpecPath),
0, 0,
(GInstanceInitFunc) gimp_param_vectors_init (GInstanceInitFunc) gimp_param_path_init
}; };
type = g_type_register_static (GIMP_TYPE_PARAM_ITEM, type = g_type_register_static (GIMP_TYPE_PARAM_ITEM,
"GimpParamVectors", &info, 0); "GimpParamPath", &info, 0);
} }
return type; return type;
} }
static void static void
gimp_param_vectors_class_init (GParamSpecClass *klass) gimp_param_path_class_init (GParamSpecClass *klass)
{ {
klass->value_type = GIMP_TYPE_VECTORS; klass->value_type = GIMP_TYPE_PATH;
} }
static void static void
gimp_param_vectors_init (GParamSpec *pspec) gimp_param_path_init (GParamSpec *pspec)
{ {
} }
/** /**
* gimp_param_spec_vectors: * gimp_param_spec_path:
* @name: Canonical name of the property specified. * @name: Canonical name of the property specified.
* @nick: Nick name of the property specified. * @nick: Nick name of the property specified.
* @blurb: Description of the property specified. * @blurb: Description of the property specified.
* @none_ok: Whether no is a valid value. * @none_ok: Whether no is a valid value.
* @flags: Flags for the property specified. * @flags: Flags for the property specified.
* *
* Creates a new #GimpParamSpecVectors specifying a * Creates a new #GimpParamSpecPath specifying a
* [type@Vectors] property. * [type@Path] property.
* *
* See g_param_spec_internal() for details on property names. * See g_param_spec_internal() for details on property names.
* *
* Returns: (transfer full): The newly created #GimpParamSpecVectors. * Returns: (transfer full): The newly created #GimpParamSpecPath.
* *
* Since: 3.0 * Since: 3.0
**/ **/
GParamSpec * GParamSpec *
gimp_param_spec_vectors (const gchar *name, gimp_param_spec_path (const gchar *name,
const gchar *nick, const gchar *nick,
const gchar *blurb, const gchar *blurb,
gboolean none_ok, gboolean none_ok,
GParamFlags flags) GParamFlags flags)
{ {
GimpParamSpecItem *ispec; GimpParamSpecItem *ispec;
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS, ispec = g_param_spec_internal (GIMP_TYPE_PARAM_PATH,
name, nick, blurb, flags); name, nick, blurb, flags);
g_return_val_if_fail (ispec, NULL); g_return_val_if_fail (ispec, NULL);

View file

@ -278,30 +278,30 @@ GParamSpec * gimp_param_spec_selection (const gchar *name,
/* /*
* GIMP_TYPE_PARAM_VECTORS * GIMP_TYPE_PARAM_PATH
*/ */
#define GIMP_VALUE_HOLDS_VECTORS(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\ #define GIMP_VALUE_HOLDS_PATH(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GIMP_TYPE_VECTORS)) GIMP_TYPE_PATH))
#define GIMP_TYPE_PARAM_VECTORS (gimp_param_vectors_get_type ()) #define GIMP_TYPE_PARAM_PATH (gimp_param_path_get_type ())
#define GIMP_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_VECTORS, GimpParamSpecVectors)) #define GIMP_PARAM_SPEC_PATH(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_PATH, GimpParamSpecPath))
#define GIMP_IS_PARAM_SPEC_VECTORS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_VECTORS)) #define GIMP_IS_PARAM_SPEC_PATH(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_PATH))
typedef struct _GimpParamSpecVectors GimpParamSpecVectors; typedef struct _GimpParamSpecPath GimpParamSpecPath;
struct _GimpParamSpecVectors struct _GimpParamSpecPath
{ {
GimpParamSpecItem parent_instance; GimpParamSpecItem parent_instance;
}; };
GType gimp_param_vectors_get_type (void) G_GNUC_CONST; GType gimp_param_path_get_type (void) G_GNUC_CONST;
GParamSpec * gimp_param_spec_vectors (const gchar *name, GParamSpec * gimp_param_spec_path (const gchar *name,
const gchar *nick, const gchar *nick,
const gchar *blurb, const gchar *blurb,
gboolean none_ok, gboolean none_ok,
GParamFlags flags); GParamFlags flags);
/* /*

View file

@ -1,7 +1,7 @@
/* LIBGIMP - The GIMP Library /* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
* *
* gimpvectors.c * gimppath.c
* Copyright (C) Jehan * Copyright (C) Jehan
* *
* This library is free software: you can redistribute it and/or * This library is free software: you can redistribute it and/or
@ -24,48 +24,48 @@
#include "gimp.h" #include "gimp.h"
struct _GimpVectors struct _GimpPath
{ {
GimpItem parent_instance; GimpItem parent_instance;
}; };
G_DEFINE_TYPE (GimpVectors, gimp_vectors, GIMP_TYPE_ITEM) G_DEFINE_TYPE (GimpPath, gimp_path, GIMP_TYPE_ITEM)
#define parent_class gimp_vectors_parent_class #define parent_class gimp_path_parent_class
static void static void
gimp_vectors_class_init (GimpVectorsClass *klass) gimp_path_class_init (GimpPathClass *klass)
{ {
} }
static void static void
gimp_vectors_init (GimpVectors *vectors) gimp_path_init (GimpPath *path)
{ {
} }
/** /**
* gimp_vectors_get_by_id: * gimp_path_get_by_id:
* @vectors_id: The vectors id. * @path_id: The path id.
* *
* Returns a #GimpVectors representing @vectors_id. This function * Returns a #GimpPath representing @path_id. This function
* calls gimp_item_get_by_id() and returns the item if it is vectors * calls gimp_item_get_by_id() and returns the item if it is a path
* or %NULL otherwise. * or %NULL otherwise.
* *
* Returns: (nullable) (transfer none): a #GimpVectors for @vectors_id * Returns: (nullable) (transfer none): a #GimpPath for @path_id
* or %NULL if @vectors_id does not represent a valid * or %NULL if @path_id does not represent a valid
* vectors. The object belongs to libgimp and you must not * path. The object belongs to libgimp and you must not
* modify or unref it. * modify or unref it.
* *
* Since: 3.0 * Since: 3.0
**/ **/
GimpVectors * GimpPath *
gimp_vectors_get_by_id (gint32 vectors_id) gimp_path_get_by_id (gint32 path_id)
{ {
GimpItem *item = gimp_item_get_by_id (vectors_id); GimpItem *item = gimp_item_get_by_id (path_id);
if (GIMP_IS_VECTORS (item)) if (GIMP_IS_PATH (item))
return (GimpVectors *) item; return (GimpPath *) item;
return NULL; return NULL;
} }

View file

@ -1,7 +1,7 @@
/* LIBGIMP - The GIMP Library /* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
* *
* gimpvectors.h * gimppath.h
* Copyright (C) Jehan * Copyright (C) Jehan
* *
* This library is free software: you can redistribute it and/or * This library is free software: you can redistribute it and/or
@ -23,21 +23,21 @@
#error "Only <libgimp/gimp.h> can be included directly." #error "Only <libgimp/gimp.h> can be included directly."
#endif #endif
#ifndef __GIMP_VECTORS_H__ #ifndef __GIMP_PATH_H__
#define __GIMP_VECTORS_H__ #define __GIMP_PATH_H__
G_BEGIN_DECLS G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
#define GIMP_TYPE_VECTORS (gimp_vectors_get_type ()) #define GIMP_TYPE_PATH (gimp_path_get_type ())
G_DECLARE_FINAL_TYPE (GimpVectors, gimp_vectors, GIMP, VECTORS, GimpItem) G_DECLARE_FINAL_TYPE (GimpPath, gimp_path, GIMP, PATH, GimpItem)
GimpVectors * gimp_vectors_get_by_id (gint32 vectors_id); GimpPath * gimp_path_get_by_id (gint32 path_id);
G_END_DECLS G_END_DECLS
#endif /* __GIMP_VECTORS_H__ */ #endif /* __GIMP_PATH_H__ */

View file

@ -51,13 +51,13 @@
* *
* Since: 2.4 * Since: 2.4
**/ **/
GimpVectors * GimpPath *
gimp_path_new (GimpImage *image, gimp_path_new (GimpImage *image,
const gchar *name) const gchar *name)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path = NULL; GimpPath *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -70,7 +70,7 @@ gimp_path_new (GimpImage *image,
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
path = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_PATH (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
@ -91,13 +91,13 @@ gimp_path_new (GimpImage *image,
* *
* Since: 2.6 * Since: 2.6
**/ **/
GimpVectors * GimpPath *
gimp_path_new_from_text_layer (GimpImage *image, gimp_path_new_from_text_layer (GimpImage *image,
GimpLayer *layer) GimpLayer *layer)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path = NULL; GimpPath *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -110,7 +110,7 @@ gimp_path_new_from_text_layer (GimpImage *image,
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
path = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_PATH (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
@ -130,15 +130,15 @@ gimp_path_new_from_text_layer (GimpImage *image,
* *
* Since: 2.6 * Since: 2.6
**/ **/
GimpVectors * GimpPath *
gimp_path_copy (GimpVectors *path) gimp_path_copy (GimpPath *path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *path_copy = NULL; GimpPath *path_copy = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
@ -147,7 +147,7 @@ gimp_path_copy (GimpVectors *path)
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
path_copy = GIMP_VALUES_GET_VECTORS (return_vals, 1); path_copy = GIMP_VALUES_GET_PATH (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
@ -171,15 +171,15 @@ gimp_path_copy (GimpVectors *path)
* Since: 2.4 * Since: 2.4
**/ **/
gint * gint *
gimp_path_get_strokes (GimpVectors *path, gimp_path_get_strokes (GimpPath *path,
gint *num_strokes) gint *num_strokes)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gint *stroke_ids = NULL; gint *stroke_ids = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
@ -215,16 +215,16 @@ gimp_path_get_strokes (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gdouble gdouble
gimp_path_stroke_get_length (GimpVectors *path, gimp_path_stroke_get_length (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble precision) gdouble precision)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gdouble length = 0.0; gdouble length = 0.0;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision, G_TYPE_DOUBLE, precision,
G_TYPE_NONE); G_TYPE_NONE);
@ -267,21 +267,21 @@ gimp_path_stroke_get_length (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_get_point_at_dist (GimpVectors *path, gimp_path_stroke_get_point_at_dist (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble dist, gdouble dist,
gdouble precision, gdouble precision,
gdouble *x_point, gdouble *x_point,
gdouble *y_point, gdouble *y_point,
gdouble *slope, gdouble *slope,
gboolean *valid) gboolean *valid)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, dist, G_TYPE_DOUBLE, dist,
G_TYPE_DOUBLE, precision, G_TYPE_DOUBLE, precision,
@ -326,15 +326,15 @@ gimp_path_stroke_get_point_at_dist (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_remove_stroke (GimpVectors *path, gimp_path_remove_stroke (GimpPath *path,
gint stroke_id) gint stroke_id)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_NONE); G_TYPE_NONE);
@ -364,15 +364,15 @@ gimp_path_remove_stroke (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_close (GimpVectors *path, gimp_path_stroke_close (GimpPath *path,
gint stroke_id) gint stroke_id)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_NONE); G_TYPE_NONE);
@ -402,15 +402,15 @@ gimp_path_stroke_close (GimpVectors *path,
* Since: 3.0 * Since: 3.0
**/ **/
gboolean gboolean
gimp_path_stroke_reverse (GimpVectors *path, gimp_path_stroke_reverse (GimpPath *path,
gint stroke_id) gint stroke_id)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_NONE); G_TYPE_NONE);
@ -442,17 +442,17 @@ gimp_path_stroke_reverse (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_translate (GimpVectors *path, gimp_path_stroke_translate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble off_x, gdouble off_x,
gdouble off_y) gdouble off_y)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, off_x, G_TYPE_DOUBLE, off_x,
G_TYPE_DOUBLE, off_y, G_TYPE_DOUBLE, off_y,
@ -486,17 +486,17 @@ gimp_path_stroke_translate (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_scale (GimpVectors *path, gimp_path_stroke_scale (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble scale_x, gdouble scale_x,
gdouble scale_y) gdouble scale_y)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, scale_x, G_TYPE_DOUBLE, scale_x,
G_TYPE_DOUBLE, scale_y, G_TYPE_DOUBLE, scale_y,
@ -531,18 +531,18 @@ gimp_path_stroke_scale (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_rotate (GimpVectors *path, gimp_path_stroke_rotate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble center_x, gdouble center_x,
gdouble center_y, gdouble center_y,
gdouble angle) gdouble angle)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, center_x, G_TYPE_DOUBLE, center_x,
G_TYPE_DOUBLE, center_y, G_TYPE_DOUBLE, center_y,
@ -577,7 +577,7 @@ gimp_path_stroke_rotate (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_flip (GimpVectors *path, gimp_path_stroke_flip (GimpPath *path,
gint stroke_id, gint stroke_id,
GimpOrientationType flip_type, GimpOrientationType flip_type,
gdouble axis) gdouble axis)
@ -587,7 +587,7 @@ gimp_path_stroke_flip (GimpVectors *path,
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
GIMP_TYPE_ORIENTATION_TYPE, flip_type, GIMP_TYPE_ORIENTATION_TYPE, flip_type,
G_TYPE_DOUBLE, axis, G_TYPE_DOUBLE, axis,
@ -625,19 +625,19 @@ gimp_path_stroke_flip (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_stroke_flip_free (GimpVectors *path, gimp_path_stroke_flip_free (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x1, gdouble x1,
gdouble y1, gdouble y1,
gdouble x2, gdouble x2,
gdouble y2) gdouble y2)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x1, G_TYPE_DOUBLE, x1,
G_TYPE_DOUBLE, y1, G_TYPE_DOUBLE, y1,
@ -677,18 +677,18 @@ gimp_path_stroke_flip_free (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
GimpVectorsStrokeType GimpVectorsStrokeType
gimp_path_stroke_get_points (GimpVectors *path, gimp_path_stroke_get_points (GimpPath *path,
gint stroke_id, gint stroke_id,
gint *num_points, gint *num_points,
gdouble **controlpoints, gdouble **controlpoints,
gboolean *closed) gboolean *closed)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectorsStrokeType type = 0; GimpVectorsStrokeType type = 0;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_NONE); G_TYPE_NONE);
@ -736,7 +736,7 @@ gimp_path_stroke_get_points (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gint gint
gimp_path_stroke_new_from_points (GimpVectors *path, gimp_path_stroke_new_from_points (GimpPath *path,
GimpVectorsStrokeType type, GimpVectorsStrokeType type,
gint num_points, gint num_points,
const gdouble *controlpoints, const gdouble *controlpoints,
@ -747,7 +747,7 @@ gimp_path_stroke_new_from_points (GimpVectors *path,
gint stroke_id = 0; gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
GIMP_TYPE_VECTORS_STROKE_TYPE, type, GIMP_TYPE_VECTORS_STROKE_TYPE, type,
G_TYPE_INT, num_points, G_TYPE_INT, num_points,
GIMP_TYPE_FLOAT_ARRAY, NULL, GIMP_TYPE_FLOAT_ARRAY, NULL,
@ -787,18 +787,18 @@ gimp_path_stroke_new_from_points (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gdouble * gdouble *
gimp_path_stroke_interpolate (GimpVectors *path, gimp_path_stroke_interpolate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble precision, gdouble precision,
gint *num_coords, gint *num_coords,
gboolean *closed) gboolean *closed)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gdouble *coords = NULL; gdouble *coords = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, precision, G_TYPE_DOUBLE, precision,
G_TYPE_NONE); G_TYPE_NONE);
@ -837,16 +837,16 @@ gimp_path_stroke_interpolate (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gint gint
gimp_path_bezier_stroke_new_moveto (GimpVectors *path, gimp_path_bezier_stroke_new_moveto (GimpPath *path,
gdouble x0, gdouble x0,
gdouble y0) gdouble y0)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gint stroke_id = 0; gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_DOUBLE, x0, G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0, G_TYPE_DOUBLE, y0,
G_TYPE_NONE); G_TYPE_NONE);
@ -880,17 +880,17 @@ gimp_path_bezier_stroke_new_moveto (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_bezier_stroke_lineto (GimpVectors *path, gimp_path_bezier_stroke_lineto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0) gdouble y0)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0, G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0, G_TYPE_DOUBLE, y0,
@ -928,19 +928,19 @@ gimp_path_bezier_stroke_lineto (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_bezier_stroke_conicto (GimpVectors *path, gimp_path_bezier_stroke_conicto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
gdouble x1, gdouble x1,
gdouble y1) gdouble y1)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0, G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0, G_TYPE_DOUBLE, y0,
@ -980,21 +980,21 @@ gimp_path_bezier_stroke_conicto (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_bezier_stroke_cubicto (GimpVectors *path, gimp_path_bezier_stroke_cubicto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
gdouble x1, gdouble x1,
gdouble y1, gdouble y1,
gdouble x2, gdouble x2,
gdouble y2) gdouble y2)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gboolean success = TRUE; gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_INT, stroke_id, G_TYPE_INT, stroke_id,
G_TYPE_DOUBLE, x0, G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0, G_TYPE_DOUBLE, y0,
@ -1034,19 +1034,19 @@ gimp_path_bezier_stroke_cubicto (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gint gint
gimp_path_bezier_stroke_new_ellipse (GimpVectors *path, gimp_path_bezier_stroke_new_ellipse (GimpPath *path,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
gdouble radius_x, gdouble radius_x,
gdouble radius_y, gdouble radius_y,
gdouble angle) gdouble angle)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
gint stroke_id = 0; gint stroke_id = 0;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_DOUBLE, x0, G_TYPE_DOUBLE, x0,
G_TYPE_DOUBLE, y0, G_TYPE_DOUBLE, y0,
G_TYPE_DOUBLE, radius_x, G_TYPE_DOUBLE, radius_x,
@ -1074,7 +1074,7 @@ gimp_path_bezier_stroke_new_ellipse (GimpVectors *path,
* @merge: Merge paths into a single path object. * @merge: Merge paths into a single path object.
* @scale: Scale the SVG to image dimensions. * @scale: Scale the SVG to image dimensions.
* @num_paths: (out): The number of newly created path. * @num_paths: (out): The number of newly created path.
* @path: (out) (array length=num_paths) (element-type GimpVectors) (transfer container): The list of newly created path. * @path: (out) (array length=num_paths) (element-type GimpPath) (transfer container): The list of newly created path.
* *
* Import paths from an SVG file. * Import paths from an SVG file.
* *
@ -1086,12 +1086,12 @@ gimp_path_bezier_stroke_new_ellipse (GimpVectors *path,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_path_import_from_file (GimpImage *image, gimp_path_import_from_file (GimpImage *image,
GFile *file, GFile *file,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
gint *num_paths, gint *num_paths,
GimpVectors ***path) GimpPath ***path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1133,7 +1133,7 @@ gimp_path_import_from_file (GimpImage *image,
* @merge: Merge paths into a single path object. * @merge: Merge paths into a single path object.
* @scale: Scale the SVG to image dimensions. * @scale: Scale the SVG to image dimensions.
* @num_paths: (out): The number of newly created path. * @num_paths: (out): The number of newly created path.
* @path: (out) (array length=num_paths) (element-type GimpVectors) (transfer container): The list of newly created path. * @path: (out) (array length=num_paths) (element-type GimpPath) (transfer container): The list of newly created path.
* *
* Import paths from an SVG string. * Import paths from an SVG string.
* *
@ -1152,7 +1152,7 @@ gimp_path_import_from_string (GimpImage *image,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
gint *num_paths, gint *num_paths,
GimpVectors ***path) GimpPath ***path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1205,9 +1205,9 @@ gimp_path_import_from_string (GimpImage *image,
* Since: 2.6 * Since: 2.6
**/ **/
gboolean gboolean
gimp_path_export_to_file (GimpImage *image, gimp_path_export_to_file (GimpImage *image,
GFile *file, GFile *file,
GimpVectors *path) GimpPath *path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1216,7 +1216,7 @@ gimp_path_export_to_file (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
G_TYPE_FILE, file, G_TYPE_FILE, file,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
@ -1250,8 +1250,8 @@ gimp_path_export_to_file (GimpImage *image,
* Since: 2.6 * Since: 2.6
**/ **/
gchar * gchar *
gimp_path_export_to_string (GimpImage *image, gimp_path_export_to_string (GimpImage *image,
GimpVectors *path) GimpPath *path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1259,7 +1259,7 @@ gimp_path_export_to_string (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
GIMP_TYPE_VECTORS, path, GIMP_TYPE_PATH, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),

View file

@ -32,17 +32,17 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
GimpVectors* gimp_path_new (GimpImage *image, GimpPath* gimp_path_new (GimpImage *image,
const gchar *name); const gchar *name);
GimpVectors* gimp_path_new_from_text_layer (GimpImage *image, GimpPath* gimp_path_new_from_text_layer (GimpImage *image,
GimpLayer *layer); GimpLayer *layer);
GimpVectors* gimp_path_copy (GimpVectors *path); GimpPath* gimp_path_copy (GimpPath *path);
gint* gimp_path_get_strokes (GimpVectors *path, gint* gimp_path_get_strokes (GimpPath *path,
gint *num_strokes); gint *num_strokes);
gdouble gimp_path_stroke_get_length (GimpVectors *path, gdouble gimp_path_stroke_get_length (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble precision); gdouble precision);
gboolean gimp_path_stroke_get_point_at_dist (GimpVectors *path, gboolean gimp_path_stroke_get_point_at_dist (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble dist, gdouble dist,
gdouble precision, gdouble precision,
@ -50,64 +50,64 @@ gboolean gimp_path_stroke_get_point_at_dist (GimpVectors
gdouble *y_point, gdouble *y_point,
gdouble *slope, gdouble *slope,
gboolean *valid); gboolean *valid);
gboolean gimp_path_remove_stroke (GimpVectors *path, gboolean gimp_path_remove_stroke (GimpPath *path,
gint stroke_id); gint stroke_id);
gboolean gimp_path_stroke_close (GimpVectors *path, gboolean gimp_path_stroke_close (GimpPath *path,
gint stroke_id); gint stroke_id);
gboolean gimp_path_stroke_reverse (GimpVectors *path, gboolean gimp_path_stroke_reverse (GimpPath *path,
gint stroke_id); gint stroke_id);
gboolean gimp_path_stroke_translate (GimpVectors *path, gboolean gimp_path_stroke_translate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble off_x, gdouble off_x,
gdouble off_y); gdouble off_y);
gboolean gimp_path_stroke_scale (GimpVectors *path, gboolean gimp_path_stroke_scale (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble scale_x, gdouble scale_x,
gdouble scale_y); gdouble scale_y);
gboolean gimp_path_stroke_rotate (GimpVectors *path, gboolean gimp_path_stroke_rotate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble center_x, gdouble center_x,
gdouble center_y, gdouble center_y,
gdouble angle); gdouble angle);
gboolean gimp_path_stroke_flip (GimpVectors *path, gboolean gimp_path_stroke_flip (GimpPath *path,
gint stroke_id, gint stroke_id,
GimpOrientationType flip_type, GimpOrientationType flip_type,
gdouble axis); gdouble axis);
gboolean gimp_path_stroke_flip_free (GimpVectors *path, gboolean gimp_path_stroke_flip_free (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x1, gdouble x1,
gdouble y1, gdouble y1,
gdouble x2, gdouble x2,
gdouble y2); gdouble y2);
GimpVectorsStrokeType gimp_path_stroke_get_points (GimpVectors *path, GimpVectorsStrokeType gimp_path_stroke_get_points (GimpPath *path,
gint stroke_id, gint stroke_id,
gint *num_points, gint *num_points,
gdouble **controlpoints, gdouble **controlpoints,
gboolean *closed); gboolean *closed);
gint gimp_path_stroke_new_from_points (GimpVectors *path, gint gimp_path_stroke_new_from_points (GimpPath *path,
GimpVectorsStrokeType type, GimpVectorsStrokeType type,
gint num_points, gint num_points,
const gdouble *controlpoints, const gdouble *controlpoints,
gboolean closed); gboolean closed);
gdouble* gimp_path_stroke_interpolate (GimpVectors *path, gdouble* gimp_path_stroke_interpolate (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble precision, gdouble precision,
gint *num_coords, gint *num_coords,
gboolean *closed); gboolean *closed);
gint gimp_path_bezier_stroke_new_moveto (GimpVectors *path, gint gimp_path_bezier_stroke_new_moveto (GimpPath *path,
gdouble x0, gdouble x0,
gdouble y0); gdouble y0);
gboolean gimp_path_bezier_stroke_lineto (GimpVectors *path, gboolean gimp_path_bezier_stroke_lineto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0); gdouble y0);
gboolean gimp_path_bezier_stroke_conicto (GimpVectors *path, gboolean gimp_path_bezier_stroke_conicto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
gdouble x1, gdouble x1,
gdouble y1); gdouble y1);
gboolean gimp_path_bezier_stroke_cubicto (GimpVectors *path, gboolean gimp_path_bezier_stroke_cubicto (GimpPath *path,
gint stroke_id, gint stroke_id,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
@ -115,7 +115,7 @@ gboolean gimp_path_bezier_stroke_cubicto (GimpVectors
gdouble y1, gdouble y1,
gdouble x2, gdouble x2,
gdouble y2); gdouble y2);
gint gimp_path_bezier_stroke_new_ellipse (GimpVectors *path, gint gimp_path_bezier_stroke_new_ellipse (GimpPath *path,
gdouble x0, gdouble x0,
gdouble y0, gdouble y0,
gdouble radius_x, gdouble radius_x,
@ -126,19 +126,19 @@ gboolean gimp_path_import_from_file (GimpImage
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
gint *num_paths, gint *num_paths,
GimpVectors ***path); GimpPath ***path);
gboolean gimp_path_import_from_string (GimpImage *image, gboolean gimp_path_import_from_string (GimpImage *image,
const gchar *string, const gchar *string,
gint length, gint length,
gboolean merge, gboolean merge,
gboolean scale, gboolean scale,
gint *num_paths, gint *num_paths,
GimpVectors ***path); GimpPath ***path);
gboolean gimp_path_export_to_file (GimpImage *image, gboolean gimp_path_export_to_file (GimpImage *image,
GFile *file, GFile *file,
GimpVectors *path); GimpPath *path);
gchar* gimp_path_export_to_string (GimpImage *image, gchar* gimp_path_export_to_string (GimpImage *image,
GimpVectors *path); GimpPath *path);
G_END_DECLS G_END_DECLS

View file

@ -1602,7 +1602,7 @@ _gimp_plug_in_get_item (GimpPlugIn *plug_in,
} }
else if (gimp_item_id_is_path (item_id)) else if (gimp_item_id_is_path (item_id))
{ {
item = g_object_new (GIMP_TYPE_VECTORS, item = g_object_new (GIMP_TYPE_PATH,
"id", item_id, "id", item_id,
NULL); NULL);
} }

View file

@ -2218,8 +2218,8 @@ gimp_procedure_add_vectors_argument (GimpProcedure *procedure,
GParamFlags flags) GParamFlags flags)
{ {
_gimp_procedure_add_argument (procedure, _gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors (name, nick, blurb, gimp_param_spec_path (name, nick, blurb,
none_ok, flags)); none_ok, flags));
} }
/** /**
@ -2244,8 +2244,8 @@ gimp_procedure_add_vectors_aux_argument (GimpProcedure *procedure,
GParamFlags flags) GParamFlags flags)
{ {
_gimp_procedure_add_aux_argument (procedure, _gimp_procedure_add_aux_argument (procedure,
gimp_param_spec_vectors (name, nick, blurb, gimp_param_spec_path (name, nick, blurb,
none_ok, flags)); none_ok, flags));
} }
/** /**
@ -2270,8 +2270,8 @@ gimp_procedure_add_vectors_return_value (GimpProcedure *procedure,
GParamFlags flags) GParamFlags flags)
{ {
_gimp_procedure_add_return_value (procedure, _gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors (name, nick, blurb, gimp_param_spec_path (name, nick, blurb,
none_ok, flags)); none_ok, flags));
} }
/** /**

View file

@ -365,13 +365,13 @@ G_BEGIN_DECLS
/* vectors */ /* vectors */
#define GIMP_VALUES_GET_VECTORS(args, n) \ #define GIMP_VALUES_GET_PATH(args, n) \
g_value_get_object (gimp_value_array_index (args, n)) g_value_get_object (gimp_value_array_index (args, n))
#define GIMP_VALUES_GET_VECTORS_ID(args, n) \ #define GIMP_VALUES_GET_PATH_ID(args, n) \
gimp_item_get_id (g_value_get_object (gimp_value_array_index (args, n))) gimp_item_get_id (g_value_get_object (gimp_value_array_index (args, n)))
#define GIMP_VALUES_SET_VECTORS(args, n, value) \ #define GIMP_VALUES_SET_PATH(args, n, value) \
g_value_set_object (gimp_value_array_index (args, n), value) g_value_set_object (gimp_value_array_index (args, n), value)

View file

@ -42,7 +42,7 @@ typedef struct _GimpChannel GimpChannel;
typedef struct _GimpLayerMask GimpLayerMask; typedef struct _GimpLayerMask GimpLayerMask;
typedef struct _GimpSelection GimpSelection; typedef struct _GimpSelection GimpSelection;
typedef struct _GimpTextLayer GimpTextLayer; typedef struct _GimpTextLayer GimpTextLayer;
typedef struct _GimpVectors GimpVectors; typedef struct _GimpPath GimpPath;
typedef struct _GimpDisplay GimpDisplay; typedef struct _GimpDisplay GimpDisplay;

View file

@ -193,6 +193,7 @@ libgimp_sources_introspectable = [
'gimploadprocedure.c', 'gimploadprocedure.c',
'gimppalette.c', 'gimppalette.c',
'gimpparamspecs.c', 'gimpparamspecs.c',
'gimppath.c',
'gimppattern.c', 'gimppattern.c',
'gimppdb.c', 'gimppdb.c',
'gimpplugin.c', 'gimpplugin.c',
@ -206,7 +207,6 @@ libgimp_sources_introspectable = [
'gimpselection.c', 'gimpselection.c',
'gimptextlayer.c', 'gimptextlayer.c',
'gimpthumbnailprocedure.c', 'gimpthumbnailprocedure.c',
'gimpvectors.c',
'gimpvectorloadprocedure.c', 'gimpvectorloadprocedure.c',
gimpenums, gimpenums,
pdb_wrappers_sources, pdb_wrappers_sources,
@ -254,6 +254,7 @@ libgimp_headers_introspectable = [
'gimploadprocedure.h', 'gimploadprocedure.h',
'gimppalette.h', 'gimppalette.h',
'gimpparamspecs.h', 'gimpparamspecs.h',
'gimppath.h',
'gimppattern.h', 'gimppattern.h',
'gimppdb.h', 'gimppdb.h',
'gimpplugin.h', 'gimpplugin.h',
@ -268,7 +269,6 @@ libgimp_headers_introspectable = [
'gimptextlayer.h', 'gimptextlayer.h',
'gimpthumbnailprocedure.h', 'gimpthumbnailprocedure.h',
'gimpvectorloadprocedure.h', 'gimpvectorloadprocedure.h',
'gimpvectors.h',
pdb_wrappers_headers, pdb_wrappers_headers,
] ]

View file

@ -348,7 +348,7 @@ gimp_config_param_spec_duplicate (GParamSpec *pspec)
g_strcmp0 (type_name, "GimpGradient") == 0 || g_strcmp0 (type_name, "GimpGradient") == 0 ||
g_strcmp0 (type_name, "GimpPalette") == 0 || g_strcmp0 (type_name, "GimpPalette") == 0 ||
g_strcmp0 (type_name, "GimpPattern") == 0 || g_strcmp0 (type_name, "GimpPattern") == 0 ||
g_strcmp0 (type_name, "GimpVectors") == 0) g_strcmp0 (type_name, "GimpPath") == 0)
{ {
copy = g_param_spec_object (name, nick, blurb, copy = g_param_spec_object (name, nick, blurb,
value_type, value_type,

Some files were not shown because too many files have changed in this diff Show more