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>
* tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_bytes() to
......@@ -160,7 +160,7 @@ struct _GimpParam
* platform being compiled for.
*
* 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
GtkWidget * gimp_brush_select_widget_new (const gchar *title,
const gchar *brush_name,
const gchar *brush_name,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode,
......
......@@ -61,7 +61,7 @@ static GHashTable *gimp_brush_select_ht = NULL;
/* public functions */
const gchar *
gimp_brush_select_new (const gchar *title,
gimp_brush_select_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
......@@ -147,7 +147,7 @@ gimp_brush_select_destroy (const gchar *brush_callback)
{
g_source_remove (brush_data->idle_id);
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)
......
......@@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_BRUSH_SELECT_H__
#define __GIMP_BRUSH_SELECT_H__
......
......@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default
* title.
* @font_name: Initial font name.
* @font_name: Initial font name.
* @callback: A function to call when the selected font changes.
* @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,
*
* Returns: A #GtkWidget that you can use in your UI.
*/
GtkWidget *
GtkWidget *
gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)
{
......@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/**
* gimp_font_select_widget_set;
* @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
* callback function if one was supplied in the call to
......@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback)
{
/* 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
{
......
......@@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data);
......
......@@ -55,7 +55,7 @@ static GHashTable *gimp_font_select_ht = NULL;
/* public functions */
const gchar *
gimp_font_select_new (const gchar *title,
gimp_font_select_new (const gchar *title,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)
......
......@@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_FONT_SELECT_H__
#define __GIMP_FONT_SELECT_H__
......
......@@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default
* title.
* @font_name: Initial font name.
* @font_name: Initial font name.
* @callback: A function to call when the selected font changes.
* @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,
*
* Returns: A #GtkWidget that you can use in your UI.
*/
GtkWidget *
GtkWidget *
gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)
{
......@@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/**
* gimp_font_select_widget_set;
* @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
* callback function if one was supplied in the call to
......@@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback)
{
/* 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
{
......
......@@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_gradient_select_widget_new (const gchar *title,
const gchar *gradient_name,
const gchar *gradient_name,
GimpRunGradientCallback callback,
gpointer data);
......
......@@ -57,7 +57,7 @@ static GHashTable *gimp_gradient_select_ht = NULL;
/* public functions */
const gchar *
gimp_gradient_select_new (const gchar *title,
gimp_gradient_select_new (const gchar *title,
const gchar *gradient_name,
gint sample_size,
GimpRunGradientCallback callback,
......
......@@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_GRAIDENT_SELECT_H__
#define __GIMP_GRADIENT_SELECT_H__
......
......@@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_MENU_H__
#define __GIMP_MENU_H__
......
......@@ -4,7 +4,7 @@
* gimpmisc.c
* 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
* 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)
*
* This library is free software; you can redistribute it and/or
......@@ -49,7 +49,7 @@ struct _GimpPixelFetcher
gboolean shadow;
};
struct _GimpRgnIterator
struct _GimpRgnIterator
{
GimpDrawable *drawable;
gint x1, y1, x2, y2;
......@@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable)
pf = g_new (GimpPixelFetcher, 1);
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->col = -1;
......@@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf)
}
}
void
void
gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow)
{
......@@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf,
pf->col = col;
pf->row = row;
}
return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff);
}
......@@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
break;
case PIXEL_BLACK:
if (x < 0 || x >= pf->img_width ||
if (x < 0 || x >= pf->img_width ||
y < 0 || y >= pf->img_height)
{
i = pf->img_bpp;
......@@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable,
}
}
void
void
gimp_get_bg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *bg)
......@@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
gimp_get_color_guchar (drawable, &background, transparent, bg);
}
void
void
gimp_get_fg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *fg)
......@@ -323,10 +323,10 @@ GimpRgnIterator*
gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode)
{
GimpRgnIterator *iter = g_new (GimpRgnIterator, 1);
iter->drawable = drawable;
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);
return iter;
......@@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
}
static void
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
GimpRgnFuncSrc func, gpointer data)
{
gpointer pr;
......@@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1);
area_so_far = 0;
for (pr = gimp_pixel_rgns_register (1, srcPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
{
guchar *src = srcPR->data;
gint y;
for (y = srcPR->y; y < srcPR->y + srcPR->h; y++)
{
guchar *s = src;
gint x;
for (x = srcPR->x; x < srcPR->x + srcPR->w; x++)
{
func (x, y, s, srcPR->bpp, data);
s += srcPR->bpp;
}
src += srcPR->rowstride;
}
if (iter->run_mode != GIMP_RUN_NONINTERACTIVE)
{
area_so_far += srcPR->w * srcPR->h;
......@@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
}
void
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data)
{
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);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
}
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data)
{
GimpPixelRgn srcPR, destPR;
......@@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
TRUE, TRUE);
bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
......@@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gint y;
guchar* src = srcPR.data;
guchar* dest = destPR.data;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{
gint x;
......@@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
s += bpp;
d += bpp;
}
src += srcPR.rowstride;
dest += destPR.rowstride;
}
......@@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gimp_drawable_flush (iter->drawable);
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);
}
void
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data)
{
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);
gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data);
/* update the processed region */
gimp_drawable_flush (iter->drawable);
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);
}
......@@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR,
gint row;
guchar* src = srcPR->data;
guchar* dest = destPR->data;
for (row = 0; row < srcPR->h; row++)
{
gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data);
......@@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable,
void
gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data)
{
......@@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable,
FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1),
TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
......
......@@ -4,17 +4,17 @@
* gimpmisc.h
* 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
* 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)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
......@@ -45,16 +45,16 @@ GimpPixelFetcher * gimp_pixel_fetcher_new (GimpDrawable *drawable);
void gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf);
void gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow);
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
gint x,
gint y,
gint wrapmode,
guchar *pixel);
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
const guchar *pixel);
......@@ -93,28 +93,28 @@ typedef void (* GimpRgnFuncSrcDest) (gint x,
gint bpp,
gpointer data);
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRunMode run_mode);
void gimp_rgn_iterator_free (GimpRgnIterator *iter);
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data);
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data);
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc1 func,
GimpRgnFunc1 func,
gpointer data);
void gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc2 func,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data);
G_END_DECLS
......
......@@ -4,7 +4,7 @@
* gimpmiscui.c
* 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
* 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)
*
* This library is free software; you can redistribute it and/or
......@@ -39,27 +39,27 @@
#include "libgimp-intl.h"
#define PREVIEW_SIZE 128
#define PREVIEW_SIZE 128
#define PREVIEW_BPP 3
static void
gimp_fixme_preview_put_in_frame (GimpFixMePreview* preview)
{
GtkWidget *frame, *abox;
preview->frame = gtk_frame_new (_("Preview"));
gtk_widget_show (preview->frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (abox), 4);
gtk_container_add (GTK_CONTAINER (preview->frame), abox);
gtk_widget_show (abox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_widget_show (frame);
gtk_container_add (GTK_CONTAINER (frame), preview->widget);
}
......@@ -81,7 +81,7 @@ gimp_fixme_preview_new (GimpDrawable *drawable,
return preview;
}
void
void
gimp_fixme_preview_free (GimpFixMePreview *preview)
{
g_free (preview->cmap);
......@@ -123,9 +123,9 @@ gimp_fixme_preview_new2 (GimpImageType drawable_type,
}
gtk_preview_size (GTK_PREVIEW (preview->widget), PREVIEW_SIZE, PREVIEW_SIZE);
for (y = 0; y < PREVIEW_SIZE; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview->widget), buf, 0, y,
for (y = 0; y < PREVIEW_SIZE; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview->widget), buf, 0, y,
PREVIEW_SIZE);
g_free (buf);
......@@ -208,7 +208,7 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
gint r, g, b, a;
gint c0, c1;
for (x = 0; x < width; x++)
for (x = 0; x < width; x++)
{
switch (bpp)
{
......@@ -230,7 +230,7 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
if (preview->cmap)
{
gint index = MIN (src[x*bpp], preview->ncolors - 1);
r = preview->cmap[index * 3 + 0];
g = preview->cmap[index * 3 + 1];
b = preview->cmap[index * 3 + 2];
......@@ -239,43 +239,43 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
{
g = b = r = src[x * bpp + 0];
}
if (bpp == 2)
a = src[x*2 + 1];
else
a = 255;
break;
}
if ((x / GIMP_CHECK_SIZE_SM) & 1)
if ((x / GIMP_CHECK_SIZE_SM) & 1)
{
c0 = GIMP_CHECK_LIGHT * 255;
c1 = GIMP_CHECK_DARK * 255;
}
else
}
else
{
c0 = GIMP_CHECK_DARK * 255;
c1 = GIMP_CHECK_LIGHT * 255;
}
*p0++ = c0 + (r - c0) * a / 255;
*p0++ = c0 + (g - c0) * a / 255;
*p0++ = c0 + (b - c0) * a / 255;
*p1++ = c1 + (r - c1) * a / 255;
*p1++ = c1 + (g - c1) * a / 255;
*p1++ = c1 + (b - c1) * a / 255;
*p1++ = c1 + (b - c1) * a / 255;
}
if ((row / GIMP_CHECK_SIZE_SM) & 1)
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->odd, 0, row, width);
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->odd, 0, row, width);
}
else
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->even, 0, row, width);
preview->even, 0, row, width);
}
}
......@@ -312,7 +312,7 @@ gimp_fixme_preview_update (GimpFixMePreview *preview,
g_free (buffer);
}
void
void
gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint32 drawable_ID)
{
......@@ -322,7 +322,7 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint width = PREVIEW_SIZE;
gint height = PREVIEW_SIZE;
preview->cache =
preview->cache =
gimp_drawable_get_thumbnail_data (drawable_ID, &width, &height, &bpp);
if (width < 1 || height < 1)
......@@ -343,9 +343,9 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gtk_preview_size (GTK_PREVIEW (preview->widget), width, height);
preview->scale_x =
preview->scale_x =
(gdouble) width / (gdouble) gimp_drawable_width (drawable_ID);
preview->scale_y =
preview->scale_y =
(gdouble) height / (gdouble) gimp_drawable_height (drawable_ID);
src = preview->cache;
......@@ -363,8 +363,8 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
preview->height = GTK_PREVIEW (preview->widget)->buffer_height;
}
void
gimp_fixme_preview_fill (GimpFixMePreview *preview,
void
gimp_fixme_preview_fill (GimpFixMePreview *preview,
GimpDrawable *drawable)
{
GimpPixelRgn srcPR;
......@@ -374,15 +374,15 @@ gimp_fixme_preview_fill (GimpFixMePreview *preview,
gint bpp;
gint y;
guchar *src;
gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);