Commit 766930db authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added width, height, offset_x and offset_y parameters.

2003-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch] (gimp_item_configure): added width,
	height, offset_x and offset_y parameters.

	* app/core/gimpdrawable.c
	* app/vectors/gimpvectors.c: changed accordingly.

	* app/tools/gimpfliptool.c: removed unused variable.
parent c1ab39a5
2003-05-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch] (gimp_item_configure): added width,
height, offset_x and offset_y parameters.
* app/core/gimpdrawable.c
* app/vectors/gimpvectors.c: changed accordingly.
* app/tools/gimpfliptool.c: removed unused variable.
2003-05-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: removed gimp_drawable_offsets().
......@@ -471,14 +471,8 @@ gimp_drawable_configure (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (GIMP_IS_IMAGE (gimage));
/* if not already configured by gimp_item_copy() */
if (! GIMP_ITEM (drawable)->ID)
gimp_item_configure (GIMP_ITEM (drawable), gimage, name);
GIMP_ITEM (drawable)->width = width;
GIMP_ITEM (drawable)->height = height;
GIMP_ITEM (drawable)->offset_x = offset_x;
GIMP_ITEM (drawable)->offset_y = offset_y;
gimp_item_configure (GIMP_ITEM (drawable), gimage,
offset_x, offset_y, width, height, name);
drawable->type = type;
drawable->bytes = GIMP_IMAGE_TYPE_BYTES (type);
......
......@@ -249,7 +249,10 @@ gimp_item_real_duplicate (GimpItem *item,
new_item = g_object_new (new_type, NULL);
gimp_item_configure (new_item, gimp_item_get_image (item), new_name);
gimp_item_configure (new_item, gimp_item_get_image (item),
item->offset_x, item->offset_y,
item->width, item->height,
new_name);
g_free (new_name);
......@@ -281,20 +284,30 @@ gimp_item_removed (GimpItem *item)
void
gimp_item_configure (GimpItem *item,
GimpImage *gimage,
gint offset_x,
gint offset_y,
gint width,
gint height,
const gchar *name)
{
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (item->ID == 0);
g_return_if_fail (item->gimage == 0);
g_return_if_fail (GIMP_IS_IMAGE (gimage));
item->ID = gimage->gimp->next_item_ID++;
if (item->ID == 0)
{
item->ID = gimage->gimp->next_item_ID++;
g_hash_table_insert (gimage->gimp->item_table,
GINT_TO_POINTER (item->ID),
item);
g_hash_table_insert (gimage->gimp->item_table,
GINT_TO_POINTER (item->ID),
item);
gimp_item_set_image (item, gimage);
}
gimp_item_set_image (item, gimage);
item->width = width;
item->height = height;
item->offset_x = offset_x;
item->offset_y = offset_y;
gimp_object_set_name (GIMP_OBJECT (item), name ? name : _("Unnamed"));
}
......
......@@ -86,6 +86,10 @@ void gimp_item_removed (GimpItem *item);
void gimp_item_configure (GimpItem *item,
GimpImage *gimage,
gint offset_x,
gint offset_y,
gint width,
gint height,
const gchar *name);
GimpItem * gimp_item_duplicate (GimpItem *item,
GType new_type,
......
......@@ -196,7 +196,6 @@ gimp_flip_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpDrawable *drawable;
GimpFlipOptions *options;
gboolean bad_cursor = TRUE;
......
......@@ -247,7 +247,9 @@ gimp_vectors_new (GimpImage *gimage,
vectors = g_object_new (GIMP_TYPE_VECTORS, NULL);
gimp_item_configure (GIMP_ITEM (vectors), gimage, name);
gimp_item_configure (GIMP_ITEM (vectors), gimage,
0, 0, gimage->width, gimage->height,
name);
return vectors;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment