gimp r27530 - in trunk: . app/core
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27530 - in trunk: . app/core
- Date: Sun, 2 Nov 2008 23:16:47 +0000 (UTC)
Author: martinn
Date: Sun Nov 2 23:16:47 2008
New Revision: 27530
URL: http://svn.gnome.org/viewvc/gimp?rev=27530&view=rev
Log:
* app/core/gimpitem.c: Instantiate offset_node on-demand.
* app/core/gimpdrawable.c: Use gimp_item_set_offset().
Modified:
trunk/ChangeLog
trunk/app/core/gimpdrawable.c
trunk/app/core/gimpitem.c
Modified: trunk/app/core/gimpdrawable.c
==============================================================================
--- trunk/app/core/gimpdrawable.c (original)
+++ trunk/app/core/gimpdrawable.c Sun Nov 2 23:16:47 2008
@@ -748,7 +748,7 @@
drawable->bytes = tile_manager_bpp (tiles);
drawable->has_alpha = GIMP_IMAGE_TYPE_HAS_ALPHA (type);
- gimp_item_set_offsets (item, offset_x, offset_y);
+ gimp_item_set_offset (item, offset_x, offset_y);
if (gimp_item_width (item) != tile_manager_width (tiles) ||
gimp_item_height (item) != tile_manager_height (tiles))
Modified: trunk/app/core/gimpitem.c
==============================================================================
--- trunk/app/core/gimpitem.c (original)
+++ trunk/app/core/gimpitem.c Sun Nov 2 23:16:47 2008
@@ -454,11 +454,6 @@
{
item->node = gegl_node_new ();
- item->offset_node = gegl_node_new_child (item->node,
- "operation", "gegl:shift",
- "x", (gdouble) item->offset_x,
- "y", (gdouble) item->offset_y,
- NULL);
return item->node;
}
@@ -693,7 +688,7 @@
}
/**
- * gimp_item_get_offsets:
+ * gimp_item_get_offset:
* @item: The #GimpItem to check.
* @offset_x: Return location for the item's X offset.
* @offset_y: Return location for the item's Y offset.
@@ -1141,7 +1136,15 @@
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
if (! item->offset_node)
- gimp_item_get_node (item);
+ {
+ GeglNode *node = gimp_item_get_node (item);
+
+ item->offset_node = gegl_node_new_child (node,
+ "operation", "gegl:shift",
+ "x", (gdouble) item->offset_x,
+ "y", (gdouble) item->offset_y,
+ NULL);
+ }
return item->offset_node;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]