Commit 1359960a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added progress callback pointers to gimp_item_scale() and its variants.

2004-02-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.[ch]: added progress callback pointers to
	gimp_item_scale() and its variants.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/gui/layers-commands.c97999
	* app/paint-funcs/paint-funcs.[ch]
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly. Fixes bug #97999.

	* app/pdb/layer_cmds.c: regenerated.
parent f3c8c2ad
2004-02-09 Sven Neumann <sven@gimp.org>
* app/core/gimpitem.[ch]: added progress callback pointers to
gimp_item_scale() and its variants.
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimpimage-scale.c
* app/core/gimplayer.c
* app/core/gimpselection.c
* app/gui/layers-commands.c97999
* app/paint-funcs/paint-funcs.[ch]
* app/vectors/gimpvectors.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly. Fixes bug #97999.
* app/pdb/layer_cmds.c: regenerated.
2004-02-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_button_press):
......@@ -51,6 +51,7 @@
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
#include "display/gimpprogress.h"
#include "tools/gimptexttool.h"
#include "tools/tool_manager.h"
......@@ -64,14 +65,15 @@
/* local function prototypes */
static void layers_add_mask_query (GimpLayer *layer,
GtkWidget *parent);
static void layers_scale_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_resize_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_add_mask_query (GimpLayer *layer,
GtkWidget *parent);
static void layers_scale_layer_query (GimpDisplay *gdisp,
GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_resize_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
#define return_if_no_image(gimage,data) \
......@@ -349,7 +351,8 @@ layers_scale_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_scale_layer_query (gimage, active_layer, widget);
layers_scale_layer_query (GIMP_IS_DISPLAY (data) ? data : NULL,
gimage, active_layer, widget);
}
void
......@@ -1099,8 +1102,9 @@ typedef struct _ScaleLayerOptions ScaleLayerOptions;
struct _ScaleLayerOptions
{
GimpLayer *layer;
Resize *resize;
Resize *resize;
GimpDisplay *gdisp;
GimpLayer *layer;
};
static void
......@@ -1123,6 +1127,12 @@ scale_layer_query_ok_callback (GtkWidget *widget,
if (gimage)
{
GimpProgress *progress;
progress = gimp_progress_start (options->gdisp,
_("Scaling..."),
TRUE, NULL, NULL);
if (gimp_layer_is_floating_sel (layer))
{
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_SCALE,
......@@ -1135,6 +1145,7 @@ scale_layer_query_ok_callback (GtkWidget *widget,
options->resize->width,
options->resize->height,
options->resize->interpolation,
gimp_progress_update_and_flush, progress,
TRUE);
if (gimp_layer_is_floating_sel (layer))
......@@ -1144,6 +1155,8 @@ scale_layer_query_ok_callback (GtkWidget *widget,
gimp_image_undo_group_end (gimage);
}
gimp_progress_end (progress);
gimp_image_flush (gimage);
}
......@@ -1156,14 +1169,16 @@ scale_layer_query_ok_callback (GtkWidget *widget,
}
static void
layers_scale_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent)
layers_scale_layer_query (GimpDisplay *gdisp,
GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent)
{
ScaleLayerOptions *options;
options = g_new0 (ScaleLayerOptions, 1);
options->gdisp = gdisp;
options->layer = layer;
options->resize =
......@@ -1178,6 +1193,12 @@ layers_scale_layer_query (GimpImage *gimage,
G_CALLBACK (scale_layer_query_ok_callback),
options);
/* FIXME: this doesn't catch all possibilities of the layer being deleted */
g_signal_connect_object (layer, "removed",
G_CALLBACK (gtk_widget_destroy),
options->resize->resize_shell,
G_CONNECT_SWAPPED);
g_object_weak_ref (G_OBJECT (options->resize->resize_shell),
(GWeakNotify) g_free,
options);
......@@ -1272,6 +1293,12 @@ layers_resize_layer_query (GimpImage *gimage,
G_CALLBACK (resize_layer_query_ok_callback),
options);
/* FIXME: this doesn't catch all possibilities of the layer being deleted */
g_signal_connect_object (layer, "removed",
G_CALLBACK (gtk_widget_destroy),
options->resize->resize_shell,
G_CONNECT_SWAPPED);
g_object_weak_ref (G_OBJECT (options->resize->resize_shell),
(GWeakNotify) g_free,
options);
......
......@@ -77,7 +77,9 @@ static void gimp_channel_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type);
GimpInterpolationType interp_type,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_channel_resize (GimpItem *item,
gint new_width,
gint new_height,
......@@ -471,7 +473,9 @@ gimp_channel_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation_type)
GimpInterpolationType interpolation_type,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpChannel *channel = GIMP_CHANNEL (item);
......@@ -487,7 +491,8 @@ gimp_channel_scale (GimpItem *item,
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y,
interpolation_type);
interpolation_type,
progress_callback, progress_data);
/* bounds are now unknown */
channel->bounds_known = FALSE;
......
......@@ -75,7 +75,9 @@ static void gimp_drawable_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type);
GimpInterpolationType interp_type,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_drawable_resize (GimpItem *item,
gint new_width,
gint new_height,
......@@ -324,7 +326,9 @@ gimp_drawable_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation_type)
GimpInterpolationType interpolation_type,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpDrawable *drawable;
PixelRegion srcPR, destPR;
......@@ -357,14 +361,16 @@ gimp_drawable_scale (GimpItem *item,
*/
scale_region (&srcPR, &destPR,
gimp_drawable_is_indexed (drawable) ?
GIMP_INTERPOLATION_NONE : interpolation_type);
GIMP_INTERPOLATION_NONE : interpolation_type,
progress_callback, progress_data);
tile_manager_unref (drawable->tiles);
drawable->tiles = new_tiles;
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y,
interpolation_type);
interpolation_type,
progress_callback, progress_data);
/* Update the new position */
gimp_drawable_update (drawable, 0, 0, item->width, item->height);
......
......@@ -97,7 +97,9 @@ gimp_image_scale (GimpImage *gimage,
{
item = (GimpItem *) list->data;
gimp_item_scale (item, new_width, new_height, 0, 0, interpolation_type);
gimp_item_scale (item,
new_width, new_height, 0, 0,
interpolation_type, NULL, NULL);
if (progress_func)
(* progress_func) (0, progress_max, progress_current++, progress_data);
......@@ -110,7 +112,9 @@ gimp_image_scale (GimpImage *gimage,
{
item = (GimpItem *) list->data;
gimp_item_scale (item, new_width, new_height, 0, 0, interpolation_type);
gimp_item_scale (item,
new_width, new_height, 0, 0,
interpolation_type, NULL, NULL);
if (progress_func)
(* progress_func) (0, progress_max, progress_current++, progress_data);
......@@ -118,8 +122,8 @@ gimp_image_scale (GimpImage *gimage,
/* Don't forget the selection mask! */
gimp_item_scale (GIMP_ITEM (gimp_image_get_mask (gimage)),
new_width, new_height,
0, 0, interpolation_type);
new_width, new_height, 0, 0,
interpolation_type, NULL, NULL);
if (progress_func)
(* progress_func) (0, progress_max, progress_current++, progress_data);
......@@ -131,8 +135,9 @@ gimp_image_scale (GimpImage *gimage,
{
item = (GimpItem *) list->data;
if (! gimp_item_scale_by_factors (item, img_scale_w, img_scale_h,
interpolation_type))
if (! gimp_item_scale_by_factors (item,
img_scale_w, img_scale_h,
interpolation_type, NULL, NULL))
{
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more
* vanishing scaled layer dimensions. Implicit delete implemented
......
......@@ -87,7 +87,9 @@ static void gimp_item_real_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation);
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_item_real_resize (GimpItem *item,
gint new_width,
gint new_height,
......@@ -362,7 +364,9 @@ gimp_item_real_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation)
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
item->width = new_width;
item->height = new_height;
......@@ -591,7 +595,9 @@ gimp_item_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation)
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpItemClass *item_class;
......@@ -603,7 +609,7 @@ gimp_item_scale (GimpItem *item,
item_class = GIMP_ITEM_GET_CLASS (item);
item_class->scale (item, new_width, new_height, new_offset_x, new_offset_y,
interpolation);
interpolation, progress_callback, progress_data);
}
/**
......@@ -612,6 +618,8 @@ gimp_item_scale (GimpItem *item,
* @w_factor: scale factor to apply to width and horizontal offset
* @h_factor: scale factor to apply to height and vertical offset
* @interpolation:
* @progress_callback:
* @progress_data:
*
* Scales item dimensions and offsets by uniform width and
* height factors.
......@@ -639,7 +647,9 @@ gboolean
gimp_item_scale_by_factors (GimpItem *item,
gdouble w_factor,
gdouble h_factor,
GimpInterpolationType interpolation)
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
gint new_width, new_height;
gint new_offset_x, new_offset_y;
......@@ -662,7 +672,7 @@ gimp_item_scale_by_factors (GimpItem *item,
gimp_item_scale (item,
new_width, new_height,
new_offset_x, new_offset_y,
interpolation);
interpolation, progress_callback, progress_data);
return TRUE;
}
......@@ -675,6 +685,8 @@ gimp_item_scale_by_factors (GimpItem *item,
* @new_width: The width that item will acquire
* @new_height: The height that the item will acquire
* @interpolation:
* @progress_callback:
* @progress_data:
* @local_origin: sets fixed point of the scaling transform. See below.
*
* Sets item dimensions to new_width and
......@@ -701,6 +713,8 @@ gimp_item_scale_by_origin (GimpItem *item,
gint new_width,
gint new_height,
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data,
gboolean local_origin)
{
gint new_offset_x, new_offset_y;
......@@ -732,7 +746,7 @@ gimp_item_scale_by_origin (GimpItem *item,
gimp_item_scale (item,
new_width, new_height,
new_offset_x, new_offset_y,
interpolation);
interpolation, progress_callback, progress_data);
}
void
......
......@@ -83,7 +83,9 @@ struct _GimpItemClass
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation_type);
GimpInterpolationType interpolation_type,
GimpProgressFunc progress_callback,
gpointer progress_data);
void (* resize) (GimpItem *item,
gint new_width,
gint new_height,
......@@ -161,16 +163,22 @@ void gimp_item_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation);
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data);
gboolean gimp_item_scale_by_factors (GimpItem *item,
gdouble w_factor,
gdouble h_factor,
GimpInterpolationType interpolation);
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data);
void gimp_item_scale_by_origin (GimpItem *item,
gint new_width,
gint new_height,
GimpInterpolationType interpolation,
gboolean local_origin);
GimpProgressFunc progress_callback,
gpointer progress_data,
gboolean local_origin);
void gimp_item_resize (GimpItem *item,
gint new_width,
gint new_height,
......
......@@ -91,7 +91,9 @@ static void gimp_layer_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type);
GimpInterpolationType interp_type,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_layer_resize (GimpItem *item,
gint new_width,
gint new_height,
......@@ -592,7 +594,9 @@ gimp_layer_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation_type)
GimpInterpolationType interpolation_type,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpLayer *layer = GIMP_LAYER (item);
GimpImage *gimage;
......@@ -607,7 +611,8 @@ gimp_layer_scale (GimpItem *item,
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y,
interpolation_type);
interpolation_type,
progress_callback, progress_data);
/* If there is a layer mask, make sure it gets scaled also */
if (layer->mask)
......@@ -615,7 +620,7 @@ gimp_layer_scale (GimpItem *item,
gimp_item_scale (GIMP_ITEM (layer->mask),
new_width, new_height,
new_offset_x, new_offset_y,
interpolation_type);
interpolation_type, NULL, NULL);
gimp_image_undo_group_end (gimage);
}
......
......@@ -54,7 +54,9 @@ static void gimp_selection_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type);
GimpInterpolationType interp_type,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_selection_resize (GimpItem *item,
gint new_width,
gint new_height,
......@@ -236,11 +238,14 @@ gimp_selection_scale (GimpItem *item,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type)
GimpInterpolationType interp_type,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y,
interp_type);
interp_type,
progress_callback, progress_data);
item->offset_x = 0;
item->offset_y = 0;
......
......@@ -51,6 +51,7 @@
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
#include "display/gimpprogress.h"
#include "tools/gimptexttool.h"
#include "tools/tool_manager.h"
......@@ -64,14 +65,15 @@
/* local function prototypes */
static void layers_add_mask_query (GimpLayer *layer,
GtkWidget *parent);
static void layers_scale_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_resize_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_add_mask_query (GimpLayer *layer,
GtkWidget *parent);
static void layers_scale_layer_query (GimpDisplay *gdisp,
GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
static void layers_resize_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent);
#define return_if_no_image(gimage,data) \
......@@ -349,7 +351,8 @@ layers_scale_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_scale_layer_query (gimage, active_layer, widget);
layers_scale_layer_query (GIMP_IS_DISPLAY (data) ? data : NULL,
gimage, active_layer, widget);
}
void
......@@ -1099,8 +1102,9 @@ typedef struct _ScaleLayerOptions ScaleLayerOptions;
struct _ScaleLayerOptions
{
GimpLayer *layer;
Resize *resize;
Resize *resize;
GimpDisplay *gdisp;
GimpLayer *layer;
};
static void
......@@ -1123,6 +1127,12 @@ scale_layer_query_ok_callback (GtkWidget *widget,
if (gimage)
{
GimpProgress *progress;
progress = gimp_progress_start (options->gdisp,
_("Scaling..."),
TRUE, NULL, NULL);
if (gimp_layer_is_floating_sel (layer))
{
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_SCALE,
......@@ -1135,6 +1145,7 @@ scale_layer_query_ok_callback (GtkWidget *widget,
options->resize->width,
options->resize->height,
options->resize->interpolation,
gimp_progress_update_and_flush, progress,
TRUE);
if (gimp_layer_is_floating_sel (layer))
......@@ -1144,6 +1155,8 @@ scale_layer_query_ok_callback (GtkWidget *widget,
gimp_image_undo_group_end (gimage);
}
gimp_progress_end (progress);
gimp_image_flush (gimage);
}
......@@ -1156,14 +1169,16 @@ scale_layer_query_ok_callback (GtkWidget *widget,
}
static void
layers_scale_layer_query (GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent)
layers_scale_layer_query (GimpDisplay *gdisp,
GimpImage *gimage,
GimpLayer *layer,
GtkWidget *parent)
{
ScaleLayerOptions *options;
options = g_new0 (ScaleLayerOptions, 1);
options->gdisp = gdisp;
options->layer = layer;
options->resize =
......@@ -1178,6 +1193,12 @@ layers_scale_layer_query (GimpImage *gimage,
G_CALLBACK (scale_layer_query_ok_callback),
options);
/* FIXME: this doesn't catch all possibilities of the layer being deleted */
g_signal_connect_object (layer, "removed",
G_CALLBACK (gtk_widget_destroy),
options->resize->resize_shell,
G_CONNECT_SWAPPED);
g_object_weak_ref (G_OBJECT (options->resize->resize_shell),
(GWeakNotify) g_free,
options);
......@@ -1272,6 +1293,12 @@ layers_resize_layer_query (GimpImage *gimage,
G_CALLBACK (resize_layer_query_ok_callback),
options);
/* FIXME: this doesn't catch all possibilities of the layer being deleted */
g_signal_connect_object (layer, "removed",
G_CALLBACK (gtk_widget_destroy),
options->resize->resize_shell,
G_CONNECT_SWAPPED);
g_object_weak_ref (G_OBJECT (options->resize->resize_shell),
(GWeakNotify) g_free,
options);
......
......@@ -3042,7 +3042,9 @@ get_scaled_row (gdouble **src,
void
scale_region (PixelRegion *srcPR,
PixelRegion *destPR,
GimpInterpolationType interpolation_type)
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
gdouble *src[4];
guchar *src_tmp;
......@@ -3057,7 +3059,7 @@ scale_region (PixelRegion *srcPR,
gint new_y;
gint x, y;
if (interpolation_type == GIMP_INTERPOLATION_NONE)
if (interpolation == GIMP_INTERPOLATION_NONE)
{
scale_region_no_resample (srcPR, destPR);
return;
......@@ -3095,6 +3097,9 @@ scale_region (PixelRegion *srcPR,
for (y = 0; y < height; y++)
{
if (progress_callback && !(y & 0xf))
(* progress_callback) (0, height, y, progress_data);
if (height < orig_height)
{
gint max;
......@@ -3104,7 +3109,7 @@ scale_region (PixelRegion *srcPR,
if (y == 0) /* load the first row if this is the first time through */
get_scaled_row (&src[0], 0, width, srcPR, row,
src_tmp,
interpolation_type);
interpolation);
new_y = (int) (y * y_rat);
frac = 1.0 - (y * y_rat - new_y);
for (x = 0; x < width * bytes; x++)
......@@ -3114,7 +3119,7 @@ scale_region (PixelRegion *srcPR,
get_scaled_row (&src[0], ++new_y, width, srcPR, row,
src_tmp,
interpolation_type);
interpolation);
while (max > 0)
{
......@@ -3122,7 +3127,7 @@ scale_region (PixelRegion *srcPR,
accum[x] += src[3][x];
get_scaled_row (&src[0], ++new_y, width, srcPR, row,
src_tmp,
interpolation_type);
interpolation);
max--;
}
frac = (y + 1) * y_rat - ((int) ((y + 1) * y_rat));
......@@ -3142,11 +3147,11 @@ scale_region (PixelRegion *srcPR,
and put them into src[] */
get_scaled_row (&src[0], old_y + 2, width, srcPR, row,
src_tmp,
interpolation_type);
interpolation);
old_y++;
}
switch (interpolation_type)
switch (interpolation)
{
case GIMP_INTERPOLATION_CUBIC:
{
......@@ -3184,7 +3189,7 @@ scale_region (PixelRegion *srcPR,
{
get_scaled_row (&src[0], y, width, srcPR, row,
src_tmp,
interpolation_type);
interpolation);
memcpy (accum, src[3], sizeof (gdouble) * width * bytes);
}
......
......@@ -32,13 +32,13 @@ void color_pixels (guchar *dest, const guchar *color,
void blend_pixels (const guchar *src1,
const guchar *src2,
guchar *dest,
guchar blend, guint w,
guchar *dest,
guchar blend, guint w,
guint bytes);
void shade_pixels (const guchar *src, guchar *dest,
const guchar *color,
guchar rblend, guint w,
guchar rblend, guint w,
guint bytes, guint has_alpha);
void extract_alpha_pixels (const guchar *src,
......@@ -49,8 +49,10 @@ void extract_alpha_pixels (const guchar *src,
void swap_pixels (guchar *src, guchar *dest,
guint length);
void scale_pixels (const guchar *src, guchar *dest,
guint length, int scale);
void scale_pixels (const guchar *src,
guchar *dest,
guint length,
gint scale);
void add_alpha_pixels (const guchar *src, guchar *dest,
guint length, guint bytes);
......@@ -193,7 +195,7 @@ void combine_inten_and_inten_a_pixels (const guchar *src1,
const guchar *src2,
guchar *dest,
const guchar *mask,
guint opacity,
guint opacity,
const gboolean *affect,
guint length, guint bytes);
......@@ -314,8 +316,11 @@ void gaussian_blur_region (PixelRegion *, double, double);
void border_region (PixelRegion *, gint16, gint16);
void scale_region (PixelRegion *, PixelRegion *,
GimpInterpolationType);
void scale_region (PixelRegion *srcPR,
PixelRegion *destPR,
GimpInterpolationType interpolation,
GimpProgressFunc progress_callback,
gpointer progress_data);
void subsample_region (PixelRegion *, PixelRegion *,
int);
......@@ -325,7 +330,7 @@ float shapeburst_region (PixelRegion *, PixelRegion *);
void thin_region (PixelRegion *, gint16 xradius,
gint16 yradius, int edge_lock);
void fatten_region (PixelRegion *,
void fatten_region (PixelRegion *,
gint16 xradius, gint16 yradius);
void swap_region (PixelRegion *, PixelRegion *);
......@@ -347,7 +352,7 @@ void copy_component (PixelRegion *src,
void initial_region (PixelRegion *, PixelRegion *,
PixelRegion *, guchar *,
int, GimpLayerModeEffects, int *,
int, GimpLayerModeEffects, int *,
CombinationMode);
void combine_regions (PixelRegion *, PixelRegion *,
......
......@@ -455,7 +455,7 @@ layer_scale_invoker (Gimp *gimp,
if (floating_layer)
floating_sel_relax (floating_layer, TRUE);
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height, gimp->config->interpolation_type, local_origin);
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height, gimp->config->interpolation_type, NULL, NULL, local_origin);
if (floating_layer)
floating_sel_rigor (floating_layer, TRUE);
......
......@@ -82,7 +82,9 @@ static void gimp_vectors_scale (GimpItem *item,
gint new_height,