Commit 54878b79 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed gimp_drawable_width,height().

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

	* app/core/gimpdrawable.[ch]: removed gimp_drawable_width,height().

	* app/core/gimpitem.[ch]: added gimp_item_width,height().

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpscanconvert.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/gui/channels-commands.c
	* app/gui/layers-commands.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/drawable_cmds.c
	* app/pdb/selection_cmds.c: regenerated.
parent 4136e61d
2003-05-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: removed gimp_drawable_width,height().
* app/core/gimpitem.[ch]: added gimp_item_width,height().
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable-preview.c
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-preview.c
* app/core/gimpimage-projection.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/core/gimplayermask.c
* app/core/gimpscanconvert.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell.c
* app/gui/channels-commands.c
* app/gui/layers-commands.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimppaintcore.c
* app/paint/gimpsmudge.c
* app/text/gimptextlayer.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfliptool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpinktool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/drawable_cmds.c
* app/pdb/selection_cmds.c: regenerated.
2003-05-08 Michael Natterer <mitch@gimp.org>
More transform virtualization preparation:
......@@ -326,8 +326,8 @@ channels_new_channel_query (GimpImage *gimage,
if (template)
{
width = gimp_drawable_width (GIMP_DRAWABLE (template));
height = gimp_drawable_height (GIMP_DRAWABLE (template));
width = gimp_item_width (GIMP_ITEM (template));
height = gimp_item_height (GIMP_ITEM (template));
gimp_drawable_offsets (GIMP_DRAWABLE (template), &off_x, &off_y);
color = template->color;
}
......
......@@ -525,8 +525,8 @@ layers_new_layer_query (GimpImage *gimage,
if (template)
{
width = gimp_drawable_width (GIMP_DRAWABLE (template));
height = gimp_drawable_height (GIMP_DRAWABLE (template));
width = gimp_item_width (GIMP_ITEM (template));
height = gimp_item_height (GIMP_ITEM (template));
gimp_drawable_offsets (GIMP_DRAWABLE (template), &off_x, &off_y);
opacity = template->opacity;
mode = template->mode;
......@@ -981,8 +981,8 @@ layers_scale_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (GIMP_VIEWABLE (layer),
ScaleWidget,
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
gimp_item_width (GIMP_ITEM (layer)),
gimp_item_height (GIMP_ITEM (layer)),
gimage->xresolution,
gimage->yresolution,
gimage->unit,
......@@ -1075,8 +1075,8 @@ layers_resize_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (GIMP_VIEWABLE (layer),
ResizeWidget,
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
gimp_item_width (GIMP_ITEM (layer)),
gimp_item_height (GIMP_ITEM (layer)),
gimage->xresolution,
gimage->yresolution,
gimage->unit,
......
......@@ -726,8 +726,8 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
gimp_drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
gimp_item_width (GIMP_ITEM (drawable)),
gimp_item_height (GIMP_ITEM (drawable)));
/* if we were operating on the floating selection, then it's boundary
* and previews need invalidating
......
......@@ -1269,8 +1269,8 @@ gimp_channel_feather (GimpChannel *mask,
pixel_region_init (&srcPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
gimp_drawable_width (GIMP_DRAWABLE (mask)),
gimp_drawable_height (GIMP_DRAWABLE (mask)),
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
FALSE);
gaussian_blur_region (&srcPR, radius_x, radius_y);
......@@ -1291,8 +1291,9 @@ gimp_channel_sharpen (GimpChannel *mask,
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
GIMP_ITEM (mask)->width,
GIMP_ITEM (mask)->height, TRUE);
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
TRUE);
lut = threshold_lut_new (0.5, 1);
pixel_regions_process_parallel ((p_func) gimp_lut_process_inline,
......
......@@ -1269,8 +1269,8 @@ gimp_channel_feather (GimpChannel *mask,
pixel_region_init (&srcPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
gimp_drawable_width (GIMP_DRAWABLE (mask)),
gimp_drawable_height (GIMP_DRAWABLE (mask)),
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
FALSE);
gaussian_blur_region (&srcPR, radius_x, radius_y);
......@@ -1291,8 +1291,9 @@ gimp_channel_sharpen (GimpChannel *mask,
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
0, 0,
GIMP_ITEM (mask)->width,
GIMP_ITEM (mask)->height, TRUE);
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
TRUE);
lut = threshold_lut_new (0.5, 1);
pixel_regions_process_parallel ((p_func) gimp_lut_process_inline,
......
......@@ -259,14 +259,18 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
/* make sure we handle the mask correctly if it was sample-merged */
if (sample_merged)
{
gint off_x, off_y;
GimpItem *item;
gint off_x, off_y;
item = GIMP_ITEM (drawable);
/* Limit the channel bounds to the drawable's extents */
gimp_drawable_offsets (drawable, &off_x, &off_y);
x1 = CLAMP (x1, off_x, (off_x + gimp_drawable_width (drawable)));
y1 = CLAMP (y1, off_y, (off_y + gimp_drawable_height (drawable)));
x2 = CLAMP (x2, off_x, (off_x + gimp_drawable_width (drawable)));
y2 = CLAMP (y2, off_y, (off_y + gimp_drawable_height (drawable)));
x1 = CLAMP (x1, off_x, (off_x + gimp_item_width (item)));
y1 = CLAMP (y1, off_y, (off_y + gimp_item_height (item)));
x2 = CLAMP (x2, off_x, (off_x + gimp_item_width (item)));
y2 = CLAMP (y2, off_y, (off_y + gimp_item_height (item)));
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)),
x1, y1, (x2 - x1), (y2 - y1), TRUE);
......
......@@ -48,6 +48,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
gint offset_x,
gint offset_y)
{
GimpItem *item;
PixelRegion srcPR, destPR;
TileManager *new_tiles;
gint width, height;
......@@ -55,11 +56,12 @@ gimp_drawable_offset (GimpDrawable *drawable,
gint dest_x, dest_y;
guchar fill[MAX_CHANNELS] = { 0 };
if (! drawable)
return;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
item = GIMP_ITEM (drawable);
width = gimp_drawable_width (drawable);
height = gimp_drawable_height (drawable);
width = gimp_item_width (item);
height = gimp_item_height (item);
if (wrap_around)
{
......@@ -124,18 +126,18 @@ gimp_drawable_offset (GimpDrawable *drawable,
{
if (offset_x >= 0 && offset_y >= 0)
{
src_x = gimp_drawable_width (drawable) - offset_x;
src_y = gimp_drawable_height (drawable) - offset_y;
src_x = gimp_item_width (item) - offset_x;
src_y = gimp_item_height (item) - offset_y;
}
else if (offset_x >= 0 && offset_y < 0)
{
src_x = gimp_drawable_width (drawable) - offset_x;
src_x = gimp_item_width (item) - offset_x;
src_y = 0;
}
else if (offset_x < 0 && offset_y >= 0)
{
src_x = 0;
src_y = gimp_drawable_height (drawable) - offset_y;
src_y = gimp_item_height (item) - offset_y;
}
else if (offset_x < 0 && offset_y < 0)
{
......@@ -143,21 +145,24 @@ gimp_drawable_offset (GimpDrawable *drawable,
src_y = 0;
}
dest_x = (src_x + offset_x) % gimp_drawable_width (drawable);
dest_x = (src_x + offset_x) % gimp_item_width (item);
if (dest_x < 0)
dest_x = gimp_drawable_width (drawable) + dest_x;
dest_y = (src_y + offset_y) % gimp_drawable_height (drawable);
dest_x = gimp_item_width (item) + dest_x;
dest_y = (src_y + offset_y) % gimp_item_height (item);
if (dest_y < 0)
dest_y = gimp_drawable_height (drawable) + dest_y;
dest_y = gimp_item_height (item) + dest_y;
/* intersecting region */
if (offset_x != 0 && offset_y != 0)
{
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
src_x, src_y, ABS (offset_x), ABS (offset_y)
, FALSE);
src_x, src_y,
ABS (offset_x), ABS (offset_y),
FALSE);
pixel_region_init (&destPR, new_tiles,
dest_x, dest_y, ABS (offset_x), ABS (offset_y),
dest_x, dest_y,
ABS (offset_x), ABS (offset_y),
TRUE);
copy_region (&srcPR, &destPR);
}
......@@ -169,12 +174,12 @@ gimp_drawable_offset (GimpDrawable *drawable,
{
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
src_x, 0, ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
FALSE);
pixel_region_init (&destPR, new_tiles,
dest_x, dest_y + offset_y,
ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
TRUE);
}
else if (offset_y < 0)
......@@ -182,12 +187,12 @@ gimp_drawable_offset (GimpDrawable *drawable,
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
src_x, src_y - offset_y,
ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
FALSE);
pixel_region_init (&destPR, new_tiles,
dest_x, 0,
ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
TRUE);
}
......@@ -201,20 +206,20 @@ gimp_drawable_offset (GimpDrawable *drawable,
{
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
0, src_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), FALSE);
pixel_region_init (&destPR, new_tiles, dest_x + offset_x, dest_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), TRUE);
}
else if (offset_x < 0)
{
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
src_x - offset_x, src_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), FALSE);
pixel_region_init (&destPR, new_tiles, 0, dest_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), TRUE);
}
......@@ -229,7 +234,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
Gimp *gimp;
GimpRGB color;
gimp = gimp_item_get_image (GIMP_ITEM (drawable))->gimp;
gimp = gimp_item_get_image (item)->gimp;
gimp_context_get_background (gimp_get_current_context (gimp), &color);
......@@ -247,17 +252,17 @@ gimp_drawable_offset (GimpDrawable *drawable,
else if (offset_x >= 0 && offset_y < 0)
{
dest_x = 0;
dest_y = gimp_drawable_height (drawable) + offset_y;
dest_y = gimp_item_height (item) + offset_y;
}
else if (offset_x < 0 && offset_y >= 0)
{
dest_x = gimp_drawable_width (drawable) + offset_x;
dest_x = gimp_item_width (item) + offset_x;
dest_y = 0;
}
else if (offset_x < 0 && offset_y < 0)
{
dest_x = gimp_drawable_width (drawable) + offset_x;
dest_y = gimp_drawable_height (drawable) + offset_y;
dest_x = gimp_item_width (item) + offset_x;
dest_y = gimp_item_height (item) + offset_y;
}
/* intersecting region */
......@@ -275,13 +280,13 @@ gimp_drawable_offset (GimpDrawable *drawable,
pixel_region_init (&destPR, new_tiles,
dest_x, dest_y + offset_y,
ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
TRUE);
else if (offset_y < 0)
pixel_region_init (&destPR, new_tiles,
dest_x, 0,
ABS (offset_x),
gimp_drawable_height (drawable) - ABS (offset_y),
gimp_item_height (item) - ABS (offset_y),
TRUE);
color_region (&destPR, fill);
......@@ -294,13 +299,13 @@ gimp_drawable_offset (GimpDrawable *drawable,
pixel_region_init (&destPR, new_tiles,
dest_x + offset_x,
dest_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y),
TRUE);
else if (offset_x < 0)
pixel_region_init (&destPR, new_tiles,
0, dest_y,
gimp_drawable_width (drawable) - ABS (offset_x),
gimp_item_width (item) - ABS (offset_x),
ABS (offset_y),
TRUE);
......@@ -311,18 +316,17 @@ gimp_drawable_offset (GimpDrawable *drawable,
/* push an undo */
gimp_drawable_push_undo (drawable, _("Offset Drawable"),
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_item_width (item),
gimp_item_height (item),
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
gimp_drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
gimp_item_width (item),
gimp_item_height (item));
}
......@@ -223,6 +223,8 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
/* The hard way */
else
{
GimpItem *item = GIMP_ITEM (drawable);
type = GIMP_IMAGE_TYPE_BASE_TYPE (gimp_drawable_type (drawable));
switch (type)
......@@ -244,14 +246,14 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
if (width < 1) width = 1;
if (height < 1) height = 1;
while ((width * (subsample + 1) * 2 < gimp_drawable_width (drawable)) &&
(height * (subsample + 1) * 2 < gimp_drawable_height (drawable)))
while ((width * (subsample + 1) * 2 < gimp_item_width (item)) &&
(height * (subsample + 1) * 2 < gimp_item_height (item)))
subsample += 1;
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_item_width (item),
gimp_item_height (item),
FALSE);
preview_buf = temp_buf_new (width, height, bytes, 0, 0, NULL);
......
......@@ -726,8 +726,8 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
gimp_drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
gimp_item_width (GIMP_ITEM (drawable)),
gimp_item_height (GIMP_ITEM (drawable)));
/* if we were operating on the floating selection, then it's boundary
* and previews need invalidating
......
......@@ -581,6 +581,7 @@ void
gimp_drawable_fill (GimpDrawable *drawable,
const GimpRGB *color)
{
GimpItem *item;
GimpImage *gimage;
PixelRegion destPR;
guchar c[MAX_CHANNELS];
......@@ -588,7 +589,8 @@ gimp_drawable_fill (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
item = GIMP_ITEM (drawable);
gimage = gimp_item_get_image (item);
g_return_if_fail (gimage != NULL);
......@@ -638,15 +640,15 @@ gimp_drawable_fill (GimpDrawable *drawable,
pixel_region_init (&destPR,
gimp_drawable_data (drawable),
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_item_width (item),
gimp_item_height (item),
TRUE);
color_region (&destPR, c);
gimp_drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
gimp_item_width (item),
gimp_item_height (item));
}
void
......@@ -696,28 +698,32 @@ gimp_drawable_mask_bounds (GimpDrawable *drawable,
gint *x2,
gint *y2)
{
GimpItem *item;
GimpImage *gimage;
gint off_x, off_y;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
item = GIMP_ITEM (drawable);
gimage = gimp_item_get_image (item);
g_return_val_if_fail (gimage != NULL, FALSE);
if (gimp_image_mask_bounds (gimage, x1, y1, x2, y2))
{
gint off_x, off_y;
gimp_drawable_offsets (drawable, &off_x, &off_y);
*x1 = CLAMP (*x1 - off_x, 0, gimp_drawable_width (drawable));
*y1 = CLAMP (*y1 - off_y, 0, gimp_drawable_height (drawable));
*x2 = CLAMP (*x2 - off_x, 0, gimp_drawable_width (drawable));
*y2 = CLAMP (*y2 - off_y, 0, gimp_drawable_height (drawable));
*x1 = CLAMP (*x1 - off_x, 0, gimp_item_width (item));
*y1 = CLAMP (*y1 - off_y, 0, gimp_item_height (item));
*x2 = CLAMP (*x2 - off_x, 0, gimp_item_width (item));
*y2 = CLAMP (*y2 - off_y, 0, gimp_item_height (item));
return TRUE;
}
else
{
*x2 = gimp_drawable_width (drawable);
*y2 = gimp_drawable_height (drawable);
*x2 = gimp_item_width (item);
*y2 = gimp_item_height (item);
return FALSE;
}
}
......@@ -815,22 +821,6 @@ gimp_drawable_bytes_with_alpha (const GimpDrawable *drawable)
return GIMP_IMAGE_TYPE_BYTES (type);
}
gint
gimp_drawable_width (const GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), -1);
return GIMP_ITEM (drawable)->width;
}
gint
gimp_drawable_height (const GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), -1);
return GIMP_ITEM (drawable)->height;
}
gboolean
gimp_drawable_get_visible (const GimpDrawable *drawable)
{
......
......@@ -111,8 +111,6 @@ TileManager * gimp_drawable_data (const GimpDrawable *drawable);
TileManager * gimp_drawable_shadow (GimpDrawable *drawable);
gint gimp_drawable_bytes (const GimpDrawable *drawable);
gint gimp_drawable_bytes_with_alpha (const GimpDrawable *drawable);
gint gimp_drawable_width (const GimpDrawable *drawable);
gint gimp_drawable_height (const GimpDrawable *drawable);
gboolean gimp_drawable_get_visible (const GimpDrawable *drawable);
void gimp_drawable_set_visible (GimpDrawable *drawable,
......
......@@ -112,8 +112,8 @@ gimp_image_contiguous_region_by_seed (GimpImage *gimage,
{
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_item_width (GIMP_ITEM (drawable)),
gimp_item_height (GIMP_ITEM (drawable)),
FALSE);
has_alpha = gimp_drawable_has_alpha (drawable);
......@@ -127,8 +127,8 @@ gimp_image_contiguous_region_by_seed (GimpImage *gimage,
mask = gimp_channel_new_mask (gimage, srcPR.w, srcPR.h);
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)),
0, 0,
gimp_drawable_width (GIMP_DRAWABLE (mask)),
gimp_drawable_height (GIMP_DRAWABLE (mask)),
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
TRUE);
tile = tile_manager_get_tile (srcPR.tiles, x, y, TRUE, FALSE);
......@@ -217,8 +217,8 @@ gimp_image_contiguous_region_by_color (GimpImage *gimage,
d_type = gimp_drawable_type (drawable);
has_alpha = gimp_drawable_has_alpha (drawable);
indexed = gimp_drawable_is_indexed (drawable);
width = gimp_drawable_width (drawable);
height = gimp_drawable_height (drawable);
width = gimp_item_width (GIMP_ITEM (drawable));
height = gimp_item_height (GIMP_ITEM (drawable));
pixel_region_init (&imagePR, gimp_drawable_data (drawable),
0, 0,
......
......@@ -192,9 +192,9 @@ gimp_image_crop (GimpImage *gimage,
lx1 = CLAMP (off_x, 0, gimage->width);
ly1 = CLAMP (off_y, 0, gimage->height);
lx2 = CLAMP ((gimp_drawable_width (GIMP_DRAWABLE (layer)) + off_x),
lx2 = CLAMP ((gimp_item_width (GIMP_ITEM (layer)) + off_x),
0, gimage->width);
ly2 = CLAMP ((gimp_drawable_height (GIMP_DRAWABLE (layer)) + off_y),
ly2 = CLAMP ((gimp_item_height (GIMP_ITEM (layer)) + off_y),
0, gimage->height);
width = lx2 - lx1;
height = ly2 - ly1;
......
......@@ -109,9 +109,9 @@ gimp_image_mask_boundary (GimpImage *gimage,
gimp_drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y);
x1 = CLAMP (off_x, 0, gimage->width);
y1 = CLAMP (off_y, 0, gimage->height);
x2 = CLAMP (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)), 0,
x2 = CLAMP (off_x + gimp_item_width (GIMP_ITEM (l