Commit 44fd2e0a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

header cleanup, added some const qualifiers, converted tabs to spaces.

2004-04-15  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]:
	* app/paint-funcs/paint-funcs-generic.h: header cleanup, added
	some const qualifiers, converted tabs to spaces. Fixes bug #140115
	for the HEAD branch.
parent 14a88500
2004-04-15 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch]:
* app/paint-funcs/paint-funcs-generic.h: header cleanup, added
some const qualifiers, converted tabs to spaces. Fixes bug #140115
for the HEAD branch.
2004-04-15 Michael Natterer <mitch@gimp.org>
Get rid of the "current_context" which was in fact just a bunch of
......
......@@ -340,7 +340,7 @@ shade_pixels (const guchar *src,
guchar blend,
guint w,
guint bytes,
guint has_alpha)
gboolean has_alpha)
{
const guchar blend2 = (255 - blend);
const guint alpha = (has_alpha) ? bytes - 1 : bytes;
......@@ -1159,7 +1159,7 @@ replace_pixels (guchar *src1,
guchar *mask,
gint length,
gint opacity,
gboolean *affect,
const gboolean *affect,
gint bytes1,
gint bytes2)
{
......@@ -1520,7 +1520,7 @@ initial_inten_pixels (const guchar *src,
const guchar *mask,
const guchar *no_mask,
guint opacity,
const gint *affect,
const gboolean *affect,
guint length,
guint bytes)
{
......
......@@ -149,7 +149,7 @@ static void apply_layer_mode_replace (guchar *src1,
guint length,
guint bytes1,
guint bytes2,
gboolean *affect);
const gboolean *affect);
static inline void rotate_pointers (guchar **p,
guint32 n);
......@@ -886,7 +886,7 @@ combine_inten_a_and_inten_pixels (const guchar *src1,
const guchar *mask,
guint opacity,
const gboolean *affect,
guint mode_affect, /* how does the combination mode affect alpha? */
gboolean mode_affect, /* how does the combination mode affect alpha? */
guint length,
guint bytes) /* 4 or 2 depending on RGBA or GRAYA */
{
......@@ -984,7 +984,7 @@ combine_inten_a_and_inten_a_pixels (const guchar *src1,
const guchar *mask,
guint opacity,
const gboolean *affect,
guint mode_affect, /* how does the combination mode affect alpha? */
gboolean mode_affect, /* how does the combination mode affect alpha? */
guint length,
guint bytes) /* 4 or 2 depending on RGBA or GRAYA */
{
......@@ -1913,10 +1913,10 @@ extract_from_inten_pixels (guchar *src,
guchar *dest,
const guchar *mask,
const guchar *bg,
guint cut,
gboolean cut,
guint length,
guint bytes,
guint has_alpha)
gboolean has_alpha)
{
gint b, alpha;
gint dest_bytes;
......@@ -1964,10 +1964,10 @@ extract_from_indexed_pixels (guchar *src,
const guchar *mask,
const guchar *cmap,
const guchar *bg,
guint cut,
gboolean cut,
guint length,
guint bytes,
guint has_alpha)
gboolean has_alpha)
{
gint b;
gint index;
......@@ -2122,7 +2122,7 @@ void
blend_region (PixelRegion *src1,
PixelRegion *src2,
PixelRegion *dest,
gint blend)
guchar blend)
{
gint h;
guchar *s1, *s2, * d;
......@@ -2151,8 +2151,8 @@ blend_region (PixelRegion *src1,
void
shade_region (PixelRegion *src,
PixelRegion *dest,
guchar *col,
gint blend)
guchar *color,
guchar blend)
{
gint h;
guchar *s, * d;
......@@ -2316,9 +2316,9 @@ extract_from_region (PixelRegion *src,
PixelRegion *mask,
guchar *cmap,
guchar *bg,
guint type,
guint has_alpha,
guint cut)
gint type,
gboolean has_alpha,
gboolean cut)
{
gint h;
guchar *s, *d, *m;
......@@ -3703,7 +3703,7 @@ void
thin_region (PixelRegion *src,
gint16 xradius,
gint16 yradius,
gint edge_lock)
gboolean edge_lock)
{
/*
pretty much the same as fatten_region only different
......@@ -4208,7 +4208,7 @@ apply_mask_to_sub_region (gint *opacityp,
gint h;
guchar *s;
guchar *m;
gint opacity = *opacityp;
guint opacity = *opacityp;
s = src->data;
m = mask->data;
......@@ -4240,7 +4240,7 @@ combine_mask_and_sub_region (gint *opacityp,
gint h;
guchar *s;
guchar *m;
gint opacity = *opacityp;
guint opacity = *opacityp;
s = src->data;
m = mask->data;
......@@ -4322,7 +4322,7 @@ struct initial_regions_struct
{
guint opacity;
GimpLayerModeEffects mode;
gboolean *affect;
const gboolean *affect;
InitialMode type;
guchar *data;
};
......@@ -4339,7 +4339,7 @@ initial_sub_region (struct initial_regions_struct *st,
guchar *data;
guint opacity;
GimpLayerModeEffects mode;
gboolean *affect;
const gboolean *affect;
InitialMode type;
/* use src->bytes + 1 since DISSOLVE always needs a buffer with alpha */
......@@ -4477,9 +4477,9 @@ initial_region (PixelRegion *src,
PixelRegion *dest,
PixelRegion *mask,
guchar *data,
gint opacity,
guint opacity,
GimpLayerModeEffects mode,
gboolean *affect,
const gboolean *affect,
InitialMode type)
{
struct initial_regions_struct st;
......@@ -4498,7 +4498,7 @@ struct combine_regions_struct
{
guint opacity;
GimpLayerModeEffects mode;
gboolean *affect;
const gboolean *affect;
CombinationMode type;
guchar *data;
gboolean opacity_quickskip_possible;
......@@ -4543,8 +4543,7 @@ apply_indexed_layer_mode (guchar *src1,
return cmode;
}
void
static void
combine_sub_region (struct combine_regions_struct *st,
PixelRegion *src1,
PixelRegion *src2,
......@@ -4556,11 +4555,11 @@ combine_sub_region (struct combine_regions_struct *st,
guint layer_mode_opacity;
guchar *layer_mode_mask;
GimpLayerModeEffects mode;
gboolean *affect;
const gboolean *affect;
guint h;
CombinationMode combine = NO_COMBINATION;
CombinationMode type;
guint mode_affect = 0;
gboolean mode_affect = FALSE;
guchar *s, *s1, *s2;
guchar *d, *m;
guchar *buf;
......@@ -4888,7 +4887,7 @@ combine_regions (PixelRegion *src1,
guchar *data,
guint opacity,
GimpLayerModeEffects mode,
gboolean *affect,
const gboolean *affect,
CombinationMode type)
{
gboolean has_alpha1, has_alpha2;
......@@ -4975,7 +4974,7 @@ combine_regions_replace (PixelRegion *src1,
PixelRegion *mask,
guchar *data,
guint opacity,
gboolean *affect,
const gboolean *affect,
CombinationMode type)
{
guint h;
......@@ -5021,7 +5020,7 @@ apply_layer_mode_replace (guchar *src1,
guint length,
guint bytes1,
guint bytes2,
gboolean *affect)
const gboolean *affect)
{
replace_pixels (src1, src2, dest, mask, length, opacity, affect, bytes1, bytes2);
}
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment