Commit 740ab5e6 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()

2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
parent c3b7be24
2008-11-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: renamed
gimp_item_width() to gimp_item_get_width() and
gimp_item_height() to gimp_item_get_height().
* app/actions/channels-commands.c
* app/actions/drawable-commands.c
* app/actions/layers-commands.c
* app/core/<many>.c
* app/dialogs/offset-dialog.c
* app/dialogs/resize-dialog.c
* app/dialogs/scale-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell.c
* app/paint/gimpbrushcore.c
* app/paint/gimpdodgeburn.c
* app/paint/gimpink.c
* app/paint/gimppaintcore.c
* app/paint/gimpsmudge.c
* app/text/gimptextlayer-xcf.c
* app/text/gimptextlayer.c
* app/tools/gimpaligntool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimprectangletool.c
* app/tools/gimpregionselecttool.c
* app/tools/gimptexttool.c
* app/vectors/gimpvectors.c
* app/vectors/gimpvectorsmodundo.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimpviewrendererdrawable.c
* app/widgets/gimpviewrenderervectors.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/drawable.pdb: changed accordingly.
* app/pdb/drawable-cmds.c: regenerated.
2008-11-03 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpitem.c: Instantiate offset_node on-demand.
......
......@@ -145,8 +145,8 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
{
GimpChannel *template = GIMP_CHANNEL (GIMP_ACTION (action)->viewable);
width = gimp_item_width (GIMP_ITEM (template));
height = gimp_item_height (GIMP_ITEM (template));
width = gimp_item_get_width (GIMP_ITEM (template));
height = gimp_item_get_height (GIMP_ITEM (template));
color = template->color;
}
else
......
......@@ -215,11 +215,11 @@ drawable_flip_cmd_callback (GtkAction *action,
switch ((GimpOrientationType) value)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
break;
case GIMP_ORIENTATION_VERTICAL:
axis = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
axis = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
break;
default:
......@@ -262,8 +262,8 @@ drawable_rotate_cmd_callback (GtkAction *action,
gimp_item_get_offset (item, &off_x, &off_y);
center_x = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
center_y = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
center_x = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
center_y = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
if (gimp_item_get_linked (item))
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM,
......
......@@ -301,8 +301,8 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
GimpLayer *template = GIMP_LAYER (GIMP_ACTION (action)->viewable);
gimp_item_get_offset (GIMP_ITEM (template), &off_x, &off_y);
width = gimp_item_width (GIMP_ITEM (template));
height = gimp_item_height (GIMP_ITEM (template));
width = gimp_item_get_width (GIMP_ITEM (template));
height = gimp_item_get_height (GIMP_ITEM (template));
opacity = gimp_layer_get_opacity (template);
mode = gimp_layer_get_mode (template);
}
......@@ -542,7 +542,7 @@ layers_text_along_vectors_cmd_callback (GtkAction *action,
new_vectors = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text);
gimp_vectors_warp_vectors (vectors, new_vectors,
0.5 * gimp_item_height (GIMP_ITEM (layer)));
0.5 * gimp_item_get_height (GIMP_ITEM (layer)));
gimp_item_set_visible (GIMP_ITEM (new_vectors), TRUE, FALSE);
......@@ -1085,8 +1085,8 @@ layers_scale_layer_callback (GtkWidget *dialog,
gtk_widget_destroy (dialog);
if (width == gimp_item_width (item) &&
height == gimp_item_height (item))
if (width == gimp_item_get_width (item) &&
height == gimp_item_get_height (item))
return;
if (display)
......@@ -1141,8 +1141,8 @@ layers_resize_layer_callback (GtkWidget *dialog,
gtk_widget_destroy (dialog);
if (width == gimp_item_width (item) &&
height == gimp_item_height (item))
if (width == gimp_item_get_width (item) &&
height == gimp_item_get_height (item))
return;
gimp_item_resize (item, context,
......
......@@ -240,8 +240,8 @@ gimp_edit_paste (GimpImage *image,
center_y = gimp_image_get_height (image) / 2;
}
width = gimp_item_width (GIMP_ITEM (layer));
height = gimp_item_height (GIMP_ITEM (layer));
width = gimp_item_get_width (GIMP_ITEM (layer));
height = gimp_item_get_height (GIMP_ITEM (layer));
offset_x = center_x - width / 2;
offset_y = center_y - height / 2;
......
......@@ -51,13 +51,13 @@ gimp_channel_add_segment (GimpChannel *mask,
/* check horizontal extents... */
x2 = x + width;
x2 = CLAMP (x2, 0, gimp_item_width (GIMP_ITEM (mask)));
x = CLAMP (x, 0, gimp_item_width (GIMP_ITEM (mask)));
x2 = CLAMP (x2, 0, gimp_item_get_width (GIMP_ITEM (mask)));
x = CLAMP (x, 0, gimp_item_get_width (GIMP_ITEM (mask)));
width = x2 - x;
if (!width)
return;
if (y < 0 || y >= gimp_item_height (GIMP_ITEM (mask)))
if (y < 0 || y >= gimp_item_get_height (GIMP_ITEM (mask)))
return;
pixel_region_init (&maskPR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
......@@ -96,14 +96,14 @@ gimp_channel_sub_segment (GimpChannel *mask,
/* check horizontal extents... */
x2 = x + width;
x2 = CLAMP (x2, 0, gimp_item_width (GIMP_ITEM (mask)));
x = CLAMP (x, 0, gimp_item_width (GIMP_ITEM (mask)));
x2 = CLAMP (x2, 0, gimp_item_get_width (GIMP_ITEM (mask)));
x = CLAMP (x, 0, gimp_item_get_width (GIMP_ITEM (mask)));
width = x2 - x;
if (! width)
return;
if (y < 0 || y > gimp_item_height (GIMP_ITEM (mask)))
if (y < 0 || y > gimp_item_get_height (GIMP_ITEM (mask)))
return;
pixel_region_init (&maskPR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
......@@ -140,8 +140,8 @@ gimp_channel_combine_rect (GimpChannel *mask,
if (! gimp_rectangle_intersect (x, y, w, h,
0, 0,
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
gimp_item_get_width (GIMP_ITEM (mask)),
gimp_item_get_height (GIMP_ITEM (mask)),
&x, &y, &w, &h))
return;
......@@ -178,10 +178,10 @@ gimp_channel_combine_rect (GimpChannel *mask,
else
mask->bounds_known = FALSE;
mask->x1 = CLAMP (mask->x1, 0, gimp_item_width (GIMP_ITEM (mask)));
mask->y1 = CLAMP (mask->y1, 0, gimp_item_height (GIMP_ITEM (mask)));
mask->x2 = CLAMP (mask->x2, 0, gimp_item_width (GIMP_ITEM (mask)));
mask->y2 = CLAMP (mask->y2, 0, gimp_item_height (GIMP_ITEM (mask)));
mask->x1 = CLAMP (mask->x1, 0, gimp_item_get_width (GIMP_ITEM (mask)));
mask->y1 = CLAMP (mask->y1, 0, gimp_item_get_height (GIMP_ITEM (mask)));
mask->x2 = CLAMP (mask->x2, 0, gimp_item_get_width (GIMP_ITEM (mask)));
mask->y2 = CLAMP (mask->y2, 0, gimp_item_get_height (GIMP_ITEM (mask)));
gimp_drawable_update (GIMP_DRAWABLE (mask), x, y, w, h);
}
......@@ -286,8 +286,8 @@ gimp_channel_combine_ellipse_rect (GimpChannel *mask,
if (! gimp_rectangle_intersect (x, y, w, h,
0, 0,
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
gimp_item_get_width (GIMP_ITEM (mask)),
gimp_item_get_height (GIMP_ITEM (mask)),
NULL, NULL, NULL, NULL))
{
return;
......@@ -318,7 +318,7 @@ gimp_channel_combine_ellipse_rect (GimpChannel *mask,
gdouble half_ellipse_width_at_y;
/* If this row is not part of the mask, continue with the next row */
if (cur_y < 0 || cur_y >= gimp_item_height (GIMP_ITEM (mask)))
if (cur_y < 0 || cur_y >= gimp_item_get_height (GIMP_ITEM (mask)))
{
continue;
}
......@@ -483,10 +483,10 @@ gimp_channel_combine_ellipse_rect (GimpChannel *mask,
mask->bounds_known = FALSE;
}
mask->x1 = CLAMP (mask->x1, 0, gimp_item_width (GIMP_ITEM (mask)));
mask->y1 = CLAMP (mask->y1, 0, gimp_item_height (GIMP_ITEM (mask)));
mask->x2 = CLAMP (mask->x2, 0, gimp_item_width (GIMP_ITEM (mask)));
mask->y2 = CLAMP (mask->y2, 0, gimp_item_height (GIMP_ITEM (mask)));
mask->x1 = CLAMP (mask->x1, 0, gimp_item_get_width (GIMP_ITEM (mask)));
mask->y1 = CLAMP (mask->y1, 0, gimp_item_get_height (GIMP_ITEM (mask)));
mask->x2 = CLAMP (mask->x2, 0, gimp_item_get_width (GIMP_ITEM (mask)));
mask->y2 = CLAMP (mask->y2, 0, gimp_item_get_height (GIMP_ITEM (mask)));
gimp_drawable_update (GIMP_DRAWABLE (mask), x, y, w, h);
}
......@@ -579,11 +579,11 @@ gimp_channel_combine_mask (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (add_on));
if (! gimp_rectangle_intersect (off_x, off_y,
gimp_item_width (GIMP_ITEM (add_on)),
gimp_item_height (GIMP_ITEM (add_on)),
gimp_item_get_width (GIMP_ITEM (add_on)),
gimp_item_get_height (GIMP_ITEM (add_on)),
0, 0,
gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)),
gimp_item_get_width (GIMP_ITEM (mask)),
gimp_item_get_height (GIMP_ITEM (mask)),
&x, &y, &w, &h))
return;
......
......@@ -72,8 +72,8 @@ gimp_channel_select_rectangle (GimpChannel *channel,
GimpChannel *add_on;
add_on = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (item),
gimp_item_height (item));
gimp_item_get_width (item),
gimp_item_get_height (item));
gimp_channel_combine_rect (add_on, GIMP_CHANNEL_OP_ADD, x, y, w, h);
if (feather)
......@@ -123,8 +123,8 @@ gimp_channel_select_ellipse (GimpChannel *channel,
GimpChannel *add_on;
add_on = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (item),
gimp_item_height (item));
gimp_item_get_width (item),
gimp_item_get_height (item));
gimp_channel_combine_ellipse (add_on, GIMP_CHANNEL_OP_ADD,
x, y, w, h, antialias);
......@@ -177,8 +177,8 @@ gimp_channel_select_round_rect (GimpChannel *channel,
GimpChannel *add_on;
add_on = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (item),
gimp_item_height (item));
gimp_item_get_width (item),
gimp_item_get_height (item));
gimp_channel_combine_ellipse_rect (add_on, GIMP_CHANNEL_OP_ADD,
x, y, w, h,
corner_radius_x, corner_radius_y,
......@@ -234,8 +234,8 @@ gimp_channel_select_scan_convert (GimpChannel *channel,
item = GIMP_ITEM (channel);
add_on = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (item),
gimp_item_height (item));
gimp_item_get_width (item),
gimp_item_get_height (item));
gimp_scan_convert_render (scan_convert,
gimp_drawable_get_tiles (GIMP_DRAWABLE (add_on)),
offset_x, offset_y, antialias);
......@@ -374,8 +374,8 @@ gimp_channel_select_channel (GimpChannel *channel,
GimpChannel *add_on2;
add_on2 = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (item),
gimp_item_height (item));
gimp_item_get_width (item),
gimp_item_get_height (item));
gimp_channel_combine_mask (add_on2, add_on, GIMP_CHANNEL_OP_ADD,
offset_x, offset_y);
......@@ -424,8 +424,8 @@ gimp_channel_select_alpha (GimpChannel *channel,
* so simply select the whole layer's extents. --mitch
*/
add_on = gimp_channel_new_mask (gimp_item_get_image (item),
gimp_item_width (GIMP_ITEM (drawable)),
gimp_item_height (GIMP_ITEM (drawable)));
gimp_item_get_width (GIMP_ITEM (drawable)),
gimp_item_get_height (GIMP_ITEM (drawable)));
gimp_channel_all (add_on, FALSE);
}
......
......@@ -431,8 +431,8 @@ gimp_channel_convert (GimpItem *item,
if (gimp_drawable_has_alpha (drawable))
new_type = GIMP_IMAGE_TYPE_WITH_ALPHA (new_type);
new_tiles = tile_manager_new (gimp_item_width (item),
gimp_item_height (item),
new_tiles = tile_manager_new (gimp_item_get_width (item),
gimp_item_get_height (item),
GIMP_IMAGE_TYPE_BYTES (new_type));
gimp_drawable_convert_grayscale (drawable, new_tiles, old_base_type);
......@@ -451,19 +451,19 @@ gimp_channel_convert (GimpItem *item,
PixelRegion destPR;
guchar bg[1] = { 0 };
new_tiles = tile_manager_new (gimp_item_width (item),
gimp_item_height (item),
new_tiles = tile_manager_new (gimp_item_get_width (item),
gimp_item_get_height (item),
GIMP_IMAGE_TYPE_BYTES (GIMP_GRAY_IMAGE));
pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
0, 0,
gimp_item_width (item),
gimp_item_height (item),
gimp_item_get_width (item),
gimp_item_get_height (item),
FALSE);
pixel_region_init (&destPR, new_tiles,
0, 0,
gimp_item_width (item),
gimp_item_height (item),
gimp_item_get_width (item),
gimp_item_get_height (item),
TRUE);
flatten_region (&srcPR, &destPR, bg);
......@@ -483,8 +483,8 @@ gimp_channel_convert (GimpItem *item,
item->offset_x = 0;
item->offset_y = 0;
if (gimp_item_width (item) != width ||
gimp_item_height (item) != height)
if (gimp_item_get_width (item) != width ||
gimp_item_get_height (item) != height)
{
gimp_item_resize (item, gimp_get_user_context (dest_image->gimp),
width, height, 0, 0);
......@@ -516,10 +516,10 @@ gimp_channel_translate (GimpItem *item,
else
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (channel));
x1 = CLAMP ((x1 + off_x), 0, gimp_item_width (GIMP_ITEM (channel)));
y1 = CLAMP ((y1 + off_y), 0, gimp_item_height (GIMP_ITEM (channel)));
x2 = CLAMP ((x2 + off_x), 0, gimp_item_width (GIMP_ITEM (channel)));
y2 = CLAMP ((y2 + off_y), 0, gimp_item_height (GIMP_ITEM (channel)));
x1 = CLAMP ((x1 + off_x), 0, gimp_item_get_width (GIMP_ITEM (channel)));
y1 = CLAMP ((y1 + off_y), 0, gimp_item_get_height (GIMP_ITEM (channel)));
x2 = CLAMP ((x2 + off_x), 0, gimp_item_get_width (GIMP_ITEM (channel)));
y2 = CLAMP ((y2 + off_y), 0, gimp_item_get_height (GIMP_ITEM (channel)));
width = x2 - x1;
height = y2 - y1;
......@@ -546,8 +546,8 @@ gimp_channel_translate (GimpItem *item,
pixel_region_init (&srcPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), TRUE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), TRUE);
clear_region (&srcPR);
if (width != 0 && height != 0)
......@@ -571,8 +571,8 @@ gimp_channel_translate (GimpItem *item,
channel->empty = TRUE;
channel->x1 = 0;
channel->y1 = 0;
channel->x2 = gimp_item_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_height (GIMP_ITEM (channel));
channel->x2 = gimp_item_get_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_get_height (GIMP_ITEM (channel));
}
else
{
......@@ -933,8 +933,8 @@ gimp_channel_get_opacity_at (GimpPickable *pickable,
}
else
{
if (x < 0 || x >= gimp_item_width (GIMP_ITEM (channel)) ||
y < 0 || y >= gimp_item_height (GIMP_ITEM (channel)))
if (x < 0 || x >= gimp_item_get_width (GIMP_ITEM (channel)) ||
y < 0 || y >= gimp_item_get_height (GIMP_ITEM (channel)))
return 0;
}
......@@ -987,8 +987,8 @@ gimp_channel_real_boundary (GimpChannel *channel,
pixel_region_init (&bPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), FALSE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), FALSE);
channel->segs_in = boundary_find (&bPR, BOUNDARY_WITHIN_BOUNDS,
x1, y1, x2, y2,
......@@ -1047,16 +1047,16 @@ gimp_channel_real_bounds (GimpChannel *channel,
}
/* go through and calculate the bounds */
tx1 = gimp_item_width (GIMP_ITEM (channel));
ty1 = gimp_item_height (GIMP_ITEM (channel));
tx1 = gimp_item_get_width (GIMP_ITEM (channel));
ty1 = gimp_item_get_height (GIMP_ITEM (channel));
tx2 = 0;
ty2 = 0;
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), FALSE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), FALSE);
for (pr = pixel_regions_register (1, &maskPR);
pr != NULL;
......@@ -1116,17 +1116,17 @@ gimp_channel_real_bounds (GimpChannel *channel,
}
}
tx2 = CLAMP (tx2 + 1, 0, gimp_item_width (GIMP_ITEM (channel)));
ty2 = CLAMP (ty2 + 1, 0, gimp_item_height (GIMP_ITEM (channel)));
tx2 = CLAMP (tx2 + 1, 0, gimp_item_get_width (GIMP_ITEM (channel)));
ty2 = CLAMP (ty2 + 1, 0, gimp_item_get_height (GIMP_ITEM (channel)));
if (tx1 == gimp_item_width (GIMP_ITEM (channel)) &&
ty1 == gimp_item_height (GIMP_ITEM (channel)))
if (tx1 == gimp_item_get_width (GIMP_ITEM (channel)) &&
ty1 == gimp_item_get_height (GIMP_ITEM (channel)))
{
channel->empty = TRUE;
channel->x1 = 0;
channel->y1 = 0;
channel->x2 = gimp_item_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_height (GIMP_ITEM (channel));
channel->x2 = gimp_item_get_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_get_height (GIMP_ITEM (channel));
}
else
{
......@@ -1161,8 +1161,8 @@ gimp_channel_real_is_empty (GimpChannel *channel)
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), FALSE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), FALSE);
for (pr = pixel_regions_register (1, &maskPR);
pr != NULL;
......@@ -1195,8 +1195,8 @@ gimp_channel_real_is_empty (GimpChannel *channel)
channel->boundary_known = TRUE;
channel->x1 = 0;
channel->y1 = 0;
channel->x2 = gimp_item_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_height (GIMP_ITEM (channel));
channel->x2 = gimp_item_get_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_get_height (GIMP_ITEM (channel));
return TRUE;
}
......@@ -1218,16 +1218,16 @@ gimp_channel_real_feather (GimpChannel *channel,
pixel_region_init (&srcPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)),
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)),
TRUE);
gaussian_blur_region (&srcPR, radius_x, radius_y);
channel->bounds_known = FALSE;
gimp_drawable_update (GIMP_DRAWABLE (channel), 0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)));
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)));
}
static void
......@@ -1246,8 +1246,8 @@ gimp_channel_real_sharpen (GimpChannel *channel,
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)),
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)),
TRUE);
lut = threshold_lut_new (0.5, 1);
......@@ -1258,8 +1258,8 @@ gimp_channel_real_sharpen (GimpChannel *channel,
channel->bounds_known = FALSE;
gimp_drawable_update (GIMP_DRAWABLE (channel), 0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)));
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)));
}
static void
......@@ -1296,8 +1296,8 @@ gimp_channel_real_clear (GimpChannel *channel,
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), TRUE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), TRUE);
clear_region (&maskPR);
}
......@@ -1306,12 +1306,12 @@ gimp_channel_real_clear (GimpChannel *channel,
channel->empty = TRUE;
channel->x1 = 0;
channel->y1 = 0;
channel->x2 = gimp_item_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_height (GIMP_ITEM (channel));
channel->x2 = gimp_item_get_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_get_height (GIMP_ITEM (channel));
gimp_drawable_update (GIMP_DRAWABLE (channel), 0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)));
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)));
}
static void
......@@ -1331,8 +1331,8 @@ gimp_channel_real_all (GimpChannel *channel,
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), TRUE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), TRUE);
color_region (&maskPR, &bg);
/* we know the bounds */
......@@ -1340,12 +1340,12 @@ gimp_channel_real_all (GimpChannel *channel,
channel->empty = FALSE;
channel->x1 = 0;
channel->y1 = 0;
channel->x2 = gimp_item_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_height (GIMP_ITEM (channel));
channel->x2 = gimp_item_get_width (GIMP_ITEM (channel));
channel->y2 = gimp_item_get_height (GIMP_ITEM (channel));
gimp_drawable_update (GIMP_DRAWABLE (channel), 0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)));
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)));
}
static void
......@@ -1370,8 +1370,8 @@ gimp_channel_real_invert (GimpChannel *channel,
pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)), TRUE);
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)), TRUE);
lut = invert_lut_new (1);
......@@ -1384,8 +1384,8 @@ gimp_channel_real_invert (GimpChannel *channel,
channel->bounds_known = FALSE;
gimp_drawable_update (GIMP_DRAWABLE (channel), 0, 0,
gimp_item_width (GIMP_ITEM (channel)),
gimp_item_height (GIMP_ITEM (channel)));
gimp_item_get_width (GIMP_ITEM (channel)),
gimp_item_get_height (GIMP_ITEM (channel)));
}
}
......@@ -1414,8 +1414,8 @@ gimp_channel_real_border (GimpChannel *channel,
else
x1 -= radius_x;
if (x2 + radius_x > gimp_item_width (GIMP_ITEM (channel)))
x2 = gimp_item_width (GIMP_ITEM (channel));
if (x2 + radius_x > gimp_item_get_width (GIMP_ITEM (channel)))
x2 = gimp_item_get_width (GIMP_ITEM (channel));
else
x2 += radius_x;
......@@ -1424,8 +1424,8 @@ gimp_channel_real_border (GimpChannel *channel,
else
y1 -= radius_y;
if (y2 + radius_y > gimp_item_height (GIMP_ITEM (channel)))
y2 = gimp_item_height (GIMP_ITEM (channel));
if (y2 + radius_y > gimp_item_get_height (GIMP_ITEM (channel)))
y2 = gimp_item_get_height (GIMP_ITEM (channel));