added new function gimp_vectors_convert() which duplicates a GimpVectors
2003-05-18 Michael Natterer <mitch@gimp.org> * app/vectors/gimpvectors.[ch]: added new function gimp_vectors_convert() which duplicates a GimpVectors for another image. * app/widgets/gimpvectorstreeview.c (gimp_vectors_tree_view_class_init): use it as GimpItemTreeView::convert_item() implementation. Enables DND-copying of vectors between images.
This commit is contained in:
parent
c44bf94c5a
commit
bda46bbc35
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2003-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/vectors/gimpvectors.[ch]: added new function
|
||||
gimp_vectors_convert() which duplicates a GimpVectors for another
|
||||
image.
|
||||
|
||||
* app/widgets/gimpvectorstreeview.c
|
||||
(gimp_vectors_tree_view_class_init): use it as
|
||||
GimpItemTreeView::convert_item() implementation. Enables
|
||||
DND-copying of vectors between images.
|
||||
|
||||
2003-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimptransformtool.c
|
||||
|
@ -496,6 +496,30 @@ gimp_vectors_new (GimpImage *gimage,
|
||||
return vectors;
|
||||
}
|
||||
|
||||
GimpVectors *
|
||||
gimp_vectors_convert (GimpVectors *vectors,
|
||||
GimpImage *dest_image)
|
||||
{
|
||||
GimpItem *new_item;
|
||||
GimpVectors *new_vectors;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (dest_image), NULL);
|
||||
|
||||
new_item = gimp_item_duplicate (GIMP_ITEM (vectors),
|
||||
GIMP_TYPE_VECTORS,
|
||||
FALSE);
|
||||
|
||||
new_vectors = GIMP_VECTORS (new_item);
|
||||
|
||||
new_item->width = dest_image->width;
|
||||
new_item->height = dest_image->height;
|
||||
|
||||
gimp_item_set_image (new_item, dest_image);
|
||||
|
||||
return new_vectors;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_vectors_freeze (GimpVectors *vectors)
|
||||
{
|
||||
|
@ -85,6 +85,8 @@ GType gimp_vectors_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpVectors * gimp_vectors_new (GimpImage *gimage,
|
||||
const gchar *name);
|
||||
GimpVectors * gimp_vectors_convert (GimpVectors *vectors,
|
||||
GimpImage *dest_image);
|
||||
|
||||
void gimp_vectors_freeze (GimpVectors *vectors);
|
||||
void gimp_vectors_thaw (GimpVectors *vectors);
|
||||
|
@ -118,6 +118,7 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
|
||||
item_view_class->reorder_item = (GimpReorderItemFunc) gimp_image_position_vectors;
|
||||
item_view_class->add_item = (GimpAddItemFunc) gimp_image_add_vectors;
|
||||
item_view_class->remove_item = (GimpRemoveItemFunc) gimp_image_remove_vectors;
|
||||
item_view_class->convert_item = (GimpConvertItemFunc) gimp_vectors_convert;
|
||||
|
||||
item_view_class->new_desc = _("New Path");
|
||||
item_view_class->duplicate_desc = _("Duplicate Path");
|
||||
|
Loading…
Reference in New Issue
Block a user