Commit 7efa81d1 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

libgimp/gimp.h libgimp/gimpbrushmenu.h libgimp/gimpbrushselect.[ch]

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

	* libgimp/gimp.h
	* libgimp/gimpbrushmenu.h
	* libgimp/gimpbrushselect.[ch]
	* libgimp/gimpfontmenu.[ch]
	* libgimp/gimpfontselect.[ch]
	* libgimp/gimpgradientmenu.h
	* libgimp/gimpgradientselect.[ch]
	* libgimp/gimpmenu.h
	* libgimp/gimpmisc.[ch]
	* libgimp/gimpmiscui.[ch]
	* libgimp/gimppatternmenu.h
	* libgimp/gimppatternselect.[ch]
	* libgimp/gimppixelrgn.[ch]
	* libgimp/gimpproceduraldb.c
	* libgimp/gimpselection.c
	* libgimp/gimptile.h
	* libgimp/gimptypes.h
	* libgimp/gimpui.h
	* libgimp/gimpuitypes.h
	* libgimp/libgimp-intl.h
	* libgimp/stdplugins-intl.h
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpdatafiles.c
	* libgimpbase/gimpenv.c
	* libgimpbase/gimpparasite.[ch]
	* libgimpbase/gimpparasiteio.[ch]
	* libgimpbase/gimpsignal.[ch]
	* libgimpbase/gimputils.c
	* libgimpcolor/gimpadaptivesupersample.[ch]
	* libgimpcolor/gimpbilinear.[ch]
	* libgimpmath/gimpmath.h
	* libgimpmath/gimpmathtypes.h
	* libgimpwidgets/gimpbutton.[ch]
	* libgimpwidgets/gimpchainbutton.h
	* libgimpwidgets/gimpcolorarea.[ch]
	* libgimpwidgets/gimpcolornotebook.h
	* libgimpwidgets/gimpcolorscale.[ch]
	* libgimpwidgets/gimpcolorscales.h
	* libgimpwidgets/gimpcolorselect.h
	* libgimpwidgets/gimpoffsetarea.h
	* libgimpwidgets/gimppixmap.[ch]: removed trailing whitespace.
parent 2de8decd
2003-12-05 Michael Natterer <mitch@gimp.org>
* libgimp/gimp.h
* libgimp/gimpbrushmenu.h
* libgimp/gimpbrushselect.[ch]
* libgimp/gimpfontmenu.[ch]
* libgimp/gimpfontselect.[ch]
* libgimp/gimpgradientmenu.h
* libgimp/gimpgradientselect.[ch]
* libgimp/gimpmenu.h
* libgimp/gimpmisc.[ch]
* libgimp/gimpmiscui.[ch]
* libgimp/gimppatternmenu.h
* libgimp/gimppatternselect.[ch]
* libgimp/gimppixelrgn.[ch]
* libgimp/gimpproceduraldb.c
* libgimp/gimpselection.c
* libgimp/gimptile.h
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/libgimp-intl.h
* libgimp/stdplugins-intl.h
* libgimpbase/gimpbase.h
* libgimpbase/gimpdatafiles.c
* libgimpbase/gimpenv.c
* libgimpbase/gimpparasite.[ch]
* libgimpbase/gimpparasiteio.[ch]
* libgimpbase/gimpsignal.[ch]
* libgimpbase/gimputils.c
* libgimpcolor/gimpadaptivesupersample.[ch]
* libgimpcolor/gimpbilinear.[ch]
* libgimpmath/gimpmath.h
* libgimpmath/gimpmathtypes.h
* libgimpwidgets/gimpbutton.[ch]
* libgimpwidgets/gimpchainbutton.h
* libgimpwidgets/gimpcolorarea.[ch]
* libgimpwidgets/gimpcolornotebook.h
* libgimpwidgets/gimpcolorscale.[ch]
* libgimpwidgets/gimpcolorscales.h
* libgimpwidgets/gimpcolorselect.h
* libgimpwidgets/gimpoffsetarea.h
* libgimpwidgets/gimppixmap.[ch]: removed trailing whitespace.
2003-12-05 Michael Natterer <mitch@gimp.org> 2003-12-05 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_bytes() to * tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_bytes() to
...@@ -160,7 +160,7 @@ struct _GimpParam ...@@ -160,7 +160,7 @@ struct _GimpParam
* platform being compiled for. * platform being compiled for.
* *
* To use this macro, simply place a line that contains just the code * To use this macro, simply place a line that contains just the code
* MAIN() at the toplevel of your file. No semicolon should be used. * MAIN() at the toplevel of your file. No semicolon should be used.
* *
*/ */
......
...@@ -26,7 +26,7 @@ G_BEGIN_DECLS ...@@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_brush_select_widget_new (const gchar *title, GtkWidget * gimp_brush_select_widget_new (const gchar *title,
const gchar *brush_name, const gchar *brush_name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
GimpLayerModeEffects paint_mode, GimpLayerModeEffects paint_mode,
......
...@@ -61,7 +61,7 @@ static GHashTable *gimp_brush_select_ht = NULL; ...@@ -61,7 +61,7 @@ static GHashTable *gimp_brush_select_ht = NULL;
/* public functions */ /* public functions */
const gchar * const gchar *
gimp_brush_select_new (const gchar *title, gimp_brush_select_new (const gchar *title,
const gchar *brush_name, const gchar *brush_name,
gdouble opacity, gdouble opacity,
gint spacing, gint spacing,
...@@ -147,7 +147,7 @@ gimp_brush_select_destroy (const gchar *brush_callback) ...@@ -147,7 +147,7 @@ gimp_brush_select_destroy (const gchar *brush_callback)
{ {
g_source_remove (brush_data->idle_id); g_source_remove (brush_data->idle_id);
g_free (brush_data->brush_name); g_free (brush_data->brush_name);
g_free (brush_data->brush_mask_data); g_free (brush_data->brush_mask_data);
} }
if (brush_data->brush_callback) if (brush_data->brush_callback)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GIMP_BRUSH_SELECT_H__ #ifndef __GIMP_BRUSH_SELECT_H__
#define __GIMP_BRUSH_SELECT_H__ #define __GIMP_BRUSH_SELECT_H__
......
...@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget, ...@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new: * gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default * @title: Title of the dialog to use or %NULL means to use the default
* title. * title.
* @font_name: Initial font name. * @font_name: Initial font name.
* @callback: A function to call when the selected font changes. * @callback: A function to call when the selected font changes.
* @data: A pointer to arbitary data to be used in the call to @callback. * @data: A pointer to arbitary data to be used in the call to @callback.
* *
...@@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget, ...@@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* *
* Returns: A #GtkWidget that you can use in your UI. * Returns: A #GtkWidget that you can use in your UI.
*/ */
GtkWidget * GtkWidget *
gimp_font_select_widget_new (const gchar *title, gimp_font_select_widget_new (const gchar *title,
const gchar *font_name, const gchar *font_name,
GimpRunFontCallback callback, GimpRunFontCallback callback,
gpointer data) gpointer data)
{ {
...@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget) ...@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/** /**
* gimp_font_select_widget_set; * gimp_font_select_widget_set;
* @widget: A font select widget. * @widget: A font select widget.
* @font_name: Font name to set; %NULL means no change. * @font_name: Font name to set; %NULL means no change.
* *
* Sets the current font for the font select widget. Calls the * Sets the current font for the font select widget. Calls the
* callback function if one was supplied in the call to * callback function if one was supplied in the call to
...@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget, ...@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback) if (font_sel->temp_font_callback)
{ {
/* calling gimp_fonts_set_popup() raises the dialog */ /* calling gimp_fonts_set_popup() raises the dialog */
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name); gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
} }
else else
{ {
......
...@@ -26,7 +26,7 @@ G_BEGIN_DECLS ...@@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_font_select_widget_new (const gchar *title, GtkWidget * gimp_font_select_widget_new (const gchar *title,
const gchar *font_name, const gchar *font_name,
GimpRunFontCallback callback, GimpRunFontCallback callback,
gpointer data); gpointer data);
......
...@@ -55,7 +55,7 @@ static GHashTable *gimp_font_select_ht = NULL; ...@@ -55,7 +55,7 @@ static GHashTable *gimp_font_select_ht = NULL;
/* public functions */ /* public functions */
const gchar * const gchar *
gimp_font_select_new (const gchar *title, gimp_font_select_new (const gchar *title,
const gchar *font_name, const gchar *font_name,
GimpRunFontCallback callback, GimpRunFontCallback callback,
gpointer data) gpointer data)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GIMP_FONT_SELECT_H__ #ifndef __GIMP_FONT_SELECT_H__
#define __GIMP_FONT_SELECT_H__ #define __GIMP_FONT_SELECT_H__
......
...@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget, ...@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new: * gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default * @title: Title of the dialog to use or %NULL means to use the default
* title. * title.
* @font_name: Initial font name. * @font_name: Initial font name.
* @callback: A function to call when the selected font changes. * @callback: A function to call when the selected font changes.
* @data: A pointer to arbitary data to be used in the call to @callback. * @data: A pointer to arbitary data to be used in the call to @callback.
* *
...@@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget, ...@@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* *
* Returns: A #GtkWidget that you can use in your UI. * Returns: A #GtkWidget that you can use in your UI.
*/ */
GtkWidget * GtkWidget *
gimp_font_select_widget_new (const gchar *title, gimp_font_select_widget_new (const gchar *title,
const gchar *font_name, const gchar *font_name,
GimpRunFontCallback callback, GimpRunFontCallback callback,
gpointer data) gpointer data)
{ {
...@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget) ...@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/** /**
* gimp_font_select_widget_set; * gimp_font_select_widget_set;
* @widget: A font select widget. * @widget: A font select widget.
* @font_name: Font name to set; %NULL means no change. * @font_name: Font name to set; %NULL means no change.
* *
* Sets the current font for the font select widget. Calls the * Sets the current font for the font select widget. Calls the
* callback function if one was supplied in the call to * callback function if one was supplied in the call to
...@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget, ...@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback) if (font_sel->temp_font_callback)
{ {
/* calling gimp_fonts_set_popup() raises the dialog */ /* calling gimp_fonts_set_popup() raises the dialog */
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name); gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
} }
else else
{ {
......
...@@ -26,7 +26,7 @@ G_BEGIN_DECLS ...@@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_gradient_select_widget_new (const gchar *title, GtkWidget * gimp_gradient_select_widget_new (const gchar *title,
const gchar *gradient_name, const gchar *gradient_name,
GimpRunGradientCallback callback, GimpRunGradientCallback callback,
gpointer data); gpointer data);
......
...@@ -57,7 +57,7 @@ static GHashTable *gimp_gradient_select_ht = NULL; ...@@ -57,7 +57,7 @@ static GHashTable *gimp_gradient_select_ht = NULL;
/* public functions */ /* public functions */
const gchar * const gchar *
gimp_gradient_select_new (const gchar *title, gimp_gradient_select_new (const gchar *title,
const gchar *gradient_name, const gchar *gradient_name,
gint sample_size, gint sample_size,
GimpRunGradientCallback callback, GimpRunGradientCallback callback,
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GIMP_GRAIDENT_SELECT_H__ #ifndef __GIMP_GRAIDENT_SELECT_H__
#define __GIMP_GRADIENT_SELECT_H__ #define __GIMP_GRADIENT_SELECT_H__
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GIMP_MENU_H__ #ifndef __GIMP_MENU_H__
#define __GIMP_MENU_H__ #define __GIMP_MENU_H__
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* gimpmisc.c * gimpmisc.c
* Contains all kinds of miscellaneous routines factored out from different * Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can * plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk * put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess) * <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -49,7 +49,7 @@ struct _GimpPixelFetcher ...@@ -49,7 +49,7 @@ struct _GimpPixelFetcher
gboolean shadow; gboolean shadow;
}; };
struct _GimpRgnIterator struct _GimpRgnIterator
{ {
GimpDrawable *drawable; GimpDrawable *drawable;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
...@@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable) ...@@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable)
pf = g_new (GimpPixelFetcher, 1); pf = g_new (GimpPixelFetcher, 1);
gimp_drawable_mask_bounds (drawable->drawable_id, gimp_drawable_mask_bounds (drawable->drawable_id,
&pf->sel_x1, &pf->sel_y1, &pf->sel_x1, &pf->sel_y1,
&pf->sel_x2, &pf->sel_y2); &pf->sel_x2, &pf->sel_y2);
pf->col = -1; pf->col = -1;
...@@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf) ...@@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf)
} }
} }
void void
gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf, gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow) gboolean shadow)
{ {
...@@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf, ...@@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf,
pf->col = col; pf->col = col;
pf->row = row; pf->row = row;
} }
return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff); return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff);
} }
...@@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf, ...@@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
break; break;
case PIXEL_BLACK: case PIXEL_BLACK:
if (x < 0 || x >= pf->img_width || if (x < 0 || x >= pf->img_width ||
y < 0 || y >= pf->img_height) y < 0 || y >= pf->img_height)
{ {
i = pf->img_bpp; i = pf->img_bpp;
...@@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable, ...@@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable,
} }
} }
void void
gimp_get_bg_guchar (GimpDrawable *drawable, gimp_get_bg_guchar (GimpDrawable *drawable,
gboolean transparent, gboolean transparent,
guchar *bg) guchar *bg)
...@@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable, ...@@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
gimp_get_color_guchar (drawable, &background, transparent, bg); gimp_get_color_guchar (drawable, &background, transparent, bg);
} }
void void
gimp_get_fg_guchar (GimpDrawable *drawable, gimp_get_fg_guchar (GimpDrawable *drawable,
gboolean transparent, gboolean transparent,
guchar *fg) guchar *fg)
...@@ -323,10 +323,10 @@ GimpRgnIterator* ...@@ -323,10 +323,10 @@ GimpRgnIterator*
gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode) gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode)
{ {
GimpRgnIterator *iter = g_new (GimpRgnIterator, 1); GimpRgnIterator *iter = g_new (GimpRgnIterator, 1);
iter->drawable = drawable; iter->drawable = drawable;
iter->run_mode = run_mode; iter->run_mode = run_mode;
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1, gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
&iter->x2, &iter->y2); &iter->x2, &iter->y2);
return iter; return iter;
...@@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter) ...@@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
} }
static void static void
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR, gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
GimpRgnFuncSrc func, gpointer data) GimpRgnFuncSrc func, gpointer data)
{ {
gpointer pr; gpointer pr;
...@@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR, ...@@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1); total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1);
area_so_far = 0; area_so_far = 0;
for (pr = gimp_pixel_rgns_register (1, srcPR); for (pr = gimp_pixel_rgns_register (1, srcPR);
pr != NULL; pr != NULL;
pr = gimp_pixel_rgns_process (pr)) pr = gimp_pixel_rgns_process (pr))
{ {
guchar *src = srcPR->data; guchar *src = srcPR->data;
gint y; gint y;
for (y = srcPR->y; y < srcPR->y + srcPR->h; y++) for (y = srcPR->y; y < srcPR->y + srcPR->h; y++)
{ {
guchar *s = src; guchar *s = src;
gint x; gint x;
for (x = srcPR->x; x < srcPR->x + srcPR->w; x++) for (x = srcPR->x; x < srcPR->x + srcPR->w; x++)
{ {
func (x, y, s, srcPR->bpp, data); func (x, y, s, srcPR->bpp, data);
s += srcPR->bpp; s += srcPR->bpp;
} }
src += srcPR->rowstride; src += srcPR->rowstride;
} }
if (iter->run_mode != GIMP_RUN_NONINTERACTIVE) if (iter->run_mode != GIMP_RUN_NONINTERACTIVE)
{ {
area_so_far += srcPR->w * srcPR->h; area_so_far += srcPR->w * srcPR->h;
...@@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR, ...@@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
} }
void void
gimp_rgn_iterator_src (GimpRgnIterator *iter, gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func, GimpRgnFuncSrc func,
gpointer data) gpointer data)
{ {
GimpPixelRgn srcPR; GimpPixelRgn srcPR;
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1, gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, FALSE, FALSE); iter->x2 - iter->x1, iter->y2 - iter->y1, FALSE, FALSE);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data); gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
} }
void void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter, gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func, GimpRgnFuncSrcDest func,
gpointer data) gpointer data)
{ {
GimpPixelRgn srcPR, destPR; GimpPixelRgn srcPR, destPR;
...@@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter, ...@@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
TRUE, TRUE); TRUE, TRUE);
bpp = srcPR.bpp; bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR); for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL; pr != NULL;
pr = gimp_pixel_rgns_process (pr)) pr = gimp_pixel_rgns_process (pr))
...@@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter, ...@@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gint y; gint y;
guchar* src = srcPR.data; guchar* src = srcPR.data;
guchar* dest = destPR.data; guchar* dest = destPR.data;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++) for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{ {
gint x; gint x;
...@@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter, ...@@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
s += bpp; s += bpp;
d += bpp; d += bpp;
} }
src += srcPR.rowstride; src += srcPR.rowstride;
dest += destPR.rowstride; dest += destPR.rowstride;
} }
...@@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter, ...@@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gimp_drawable_flush (iter->drawable); gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE); gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1, gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
y2 - y1); y2 - y1);
} }
void void
gimp_rgn_iterator_dest (GimpRgnIterator *iter, gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func, GimpRgnFuncDest func,
gpointer data) gpointer data)
{ {
GimpPixelRgn destPR; GimpPixelRgn destPR;
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1, gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, TRUE, TRUE); iter->x2 - iter->x1, iter->y2 - iter->y1, TRUE, TRUE);
gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data); gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data);
/* update the processed region */ /* update the processed region */
gimp_drawable_flush (iter->drawable); gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE); gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1, gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1); iter->x2 - iter->x1, iter->y2 - iter->y1);
} }
...@@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR, ...@@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR,
gint row; gint row;
guchar* src = srcPR->data; guchar* src = srcPR->data;
guchar* dest = destPR->data; guchar* dest = destPR->data;
for (row = 0; row < srcPR->h; row++) for (row = 0; row < srcPR->h; row++)
{ {
gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data); gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data);
...@@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable, ...@@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable,
void void
gimp_rgn_iterate2 (GimpDrawable *drawable, gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode, GimpRunMode run_mode,
GimpRgnFunc2 func, GimpRgnFunc2 func,
gpointer data) gpointer data)
{ {
...@@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable, ...@@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable,
FALSE, FALSE); FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1), gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1),
TRUE, TRUE); TRUE, TRUE);