pass GimpImageBaseType to extract_from_region() instead of some anonymous

2005-06-17  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: pass GimpImageBaseType to
	extract_from_region() instead of some anonymous integer. Added
	some const qualifiers.
This commit is contained in:
Sven Neumann 2005-06-17 16:26:06 +00:00 committed by Sven Neumann
parent 5dcbaeb284
commit afaa010bb6
3 changed files with 27 additions and 20 deletions

View File

@ -1,3 +1,9 @@
2005-06-17 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: pass GimpImageBaseType to
extract_from_region() instead of some anonymous integer. Added
some const qualifiers.
2005-06-17 Sven Neumann <sven@gimp.org>
* app/core/gimpselection.c (gimp_selection_extract): fixed

View File

@ -2345,14 +2345,14 @@ extract_alpha_region (PixelRegion *src,
void
extract_from_region (PixelRegion *src,
PixelRegion *dest,
PixelRegion *mask,
guchar *cmap,
guchar *bg,
gint type,
gboolean has_alpha,
gboolean cut)
extract_from_region (PixelRegion *src,
PixelRegion *dest,
PixelRegion *mask,
const guchar *cmap,
const guchar *bg,
GimpImageBaseType type,
gboolean has_alpha,
gboolean cut)
{
gint h;
guchar *s, *d, *m;
@ -2371,12 +2371,13 @@ extract_from_region (PixelRegion *src,
{
switch (type)
{
case 0: /* RGB */
case 1: /* GRAY */
case GIMP_RGB:
case GIMP_GRAY:
extract_from_inten_pixels (s, d, m, bg, cut, src->w,
src->bytes, has_alpha);
break;
case 2: /* INDEXED */
case GIMP_INDEXED:
extract_from_indexed_pixels (s, d, m, cmap, bg, cut, src->w,
src->bytes, has_alpha);
break;
@ -3799,7 +3800,7 @@ struct initial_regions_struct
guint opacity;
GimpLayerModeEffects mode;
const gboolean *affect;
InitialMode type;
InitialMode type;
guchar *data;
};

View File

@ -339,14 +339,14 @@ void extract_alpha_region (PixelRegion *src,
PixelRegion *mask,
PixelRegion *dest);
void extract_from_region (PixelRegion *src,
PixelRegion *dest,
PixelRegion *mask,
guchar *cmap,
guchar *bg,
gint type,
gboolean has_alpha,
gboolean cut);
void extract_from_region (PixelRegion *src,
PixelRegion *dest,
PixelRegion *mask,
const guchar *cmap,
const guchar *bg,
GimpImageBaseType type,
gboolean has_alpha,
gboolean cut);
void convolve_region (PixelRegion *srcR,