app/core/gimpdrawable-offset.c (gimp_drawable_offset)

2004-03-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
	* app/core/gimpdrawable.c (gimp_drawable_scale) (gimp_drawable_resize)
	* app/core/gimplayer.c (gimp_layer_convert) (gimp_layer_add_alpha):
	use gimp_drawable_set_tiles() instead of fiddling with
	drawable->tiles, ->bytes etc. manually.
This commit is contained in:
Michael Natterer
2004-03-14 11:34:31 +00:00
committed by Michael Natterer
parent f36b751ce1
commit d1fe0f9e6b
4 changed files with 25 additions and 23 deletions

View File

@ -70,7 +70,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
offset_x += width;
while (offset_y < 0)
offset_y += height;
offset_x %= width;
offset_y %= height;
}
@ -321,9 +321,10 @@ gimp_drawable_offset (GimpDrawable *drawable,
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
tile_manager_unref (drawable->tiles);
drawable->tiles = new_tiles;
/* set the tiles */
gimp_drawable_set_tiles (drawable, FALSE, NULL,
new_tiles, gimp_drawable_type (drawable));
tile_manager_unref (new_tiles);
/* update the drawable */
gimp_drawable_update (drawable,