gimp r27324 - in trunk: . app/base app/core app/gegl app/paint app/paint-funcs app/widgets
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27324 - in trunk: . app/base app/core app/gegl app/paint app/paint-funcs app/widgets
- Date: Sun, 19 Oct 2008 13:47:09 +0000 (UTC)
Author: martinn
Date: Sun Oct 19 13:47:09 2008
New Revision: 27324
URL: http://svn.gnome.org/viewvc/gimp?rev=27324&view=rev
Log:
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.
* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c
* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c
* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c
* app/paint-funcs/subsample-region.c
* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c
* app/widgets/gimpviewrenderer.c: Adapt.
Modified:
trunk/ChangeLog
trunk/app/base/base-types.h
trunk/app/base/color-balance.c
trunk/app/base/colorize.c
trunk/app/base/desaturate.c
trunk/app/base/hue-saturation.c
trunk/app/base/siox.c
trunk/app/base/threshold.c
trunk/app/core/gimp-edit.c
trunk/app/core/gimp-transform-region.c
trunk/app/core/gimpchannel.c
trunk/app/core/gimpdrawable-bucket-fill.c
trunk/app/core/gimpdrawable-convert.c
trunk/app/core/gimpdrawable-stroke.c
trunk/app/core/gimpdrawable.c
trunk/app/core/gimpimage-convert.c
trunk/app/core/gimpimage.c
trunk/app/core/gimppalette-import.c
trunk/app/core/gimppickable.c
trunk/app/gegl/gimpoperationantierasemode.c
trunk/app/gegl/gimpoperationbehindmode.c
trunk/app/gegl/gimpoperationburnmode.c
trunk/app/gegl/gimpoperationcolorbalance.c
trunk/app/gegl/gimpoperationcolorerasemode.c
trunk/app/gegl/gimpoperationcolorize.c
trunk/app/gegl/gimpoperationcolormode.c
trunk/app/gegl/gimpoperationdarkenonlymode.c
trunk/app/gegl/gimpoperationdifferencemode.c
trunk/app/gegl/gimpoperationdissolvemode.c
trunk/app/gegl/gimpoperationdividemode.c
trunk/app/gegl/gimpoperationdodgemode.c
trunk/app/gegl/gimpoperationerasemode.c
trunk/app/gegl/gimpoperationgrainextractmode.c
trunk/app/gegl/gimpoperationgrainmergemode.c
trunk/app/gegl/gimpoperationhardlightmode.c
trunk/app/gegl/gimpoperationhuemode.c
trunk/app/gegl/gimpoperationhuesaturation.c
trunk/app/gegl/gimpoperationlevels.c
trunk/app/gegl/gimpoperationlightenonlymode.c
trunk/app/gegl/gimpoperationmultiplymode.c
trunk/app/gegl/gimpoperationoverlaymode.c
trunk/app/gegl/gimpoperationposterize.c
trunk/app/gegl/gimpoperationreplacemode.c
trunk/app/gegl/gimpoperationsaturationmode.c
trunk/app/gegl/gimpoperationscreenmode.c
trunk/app/gegl/gimpoperationsoftlightmode.c
trunk/app/gegl/gimpoperationsubtractmode.c
trunk/app/gegl/gimpoperationthreshold.c
trunk/app/gegl/gimpoperationvaluemode.c
trunk/app/paint-funcs/subsample-region.c
trunk/app/paint/gimpclone.c
trunk/app/paint/gimppaintbrush.c
trunk/app/widgets/gimpviewrenderer.c
Modified: trunk/app/base/base-types.h
==============================================================================
--- trunk/app/base/base-types.h (original)
+++ trunk/app/base/base-types.h Sun Oct 19 13:47:09 2008
@@ -32,16 +32,18 @@
/* convenient defines */
-#define MAX_CHANNELS 4
+#define MAX_CHANNELS 4
-#define GRAY_PIX 0
-#define ALPHA_G_PIX 1
-#define RED_PIX 0
-#define GREEN_PIX 1
-#define BLUE_PIX 2
-#define ALPHA_PIX 3
-#define INDEXED_PIX 0
-#define ALPHA_I_PIX 1
+#define RED 0
+#define GREEN 1
+#define BLUE 2
+#define ALPHA 3
+
+#define GRAY 0
+#define ALPHA_G 1
+
+#define INDEXED 0
+#define ALPHA_I 1
/* types */
Modified: trunk/app/base/color-balance.c
==============================================================================
--- trunk/app/base/color-balance.c (original)
+++ trunk/app/base/color-balance.c Sun Oct 19 13:47:09 2008
@@ -190,9 +190,9 @@
while (w--)
{
- r = s[RED_PIX];
- g = s[GREEN_PIX];
- b = s[BLUE_PIX];
+ r = s[RED];
+ g = s[GREEN];
+ b = s[BLUE];
r_n = cb->r_lookup[r];
g_n = cb->g_lookup[g];
@@ -205,12 +205,12 @@
gimp_hsl_to_rgb_int (&r_n, &g_n, &b_n);
}
- d[RED_PIX] = r_n;
- d[GREEN_PIX] = g_n;
- d[BLUE_PIX] = b_n;
+ d[RED] = r_n;
+ d[GREEN] = g_n;
+ d[BLUE] = b_n;
if (alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
s += srcPR->bytes;
d += destPR->bytes;
Modified: trunk/app/base/colorize.c
==============================================================================
--- trunk/app/base/colorize.c (original)
+++ trunk/app/base/colorize.c Sun Oct 19 13:47:09 2008
@@ -102,9 +102,9 @@
while (w--)
{
- lum = (colorize->lum_red_lookup[s[RED_PIX]] +
- colorize->lum_green_lookup[s[GREEN_PIX]] +
- colorize->lum_blue_lookup[s[BLUE_PIX]]); /* luminosity */
+ lum = (colorize->lum_red_lookup[s[RED]] +
+ colorize->lum_green_lookup[s[GREEN]] +
+ colorize->lum_blue_lookup[s[BLUE]]); /* luminosity */
if (colorize->lightness > 0)
{
@@ -117,12 +117,12 @@
lum = (gdouble) lum * (colorize->lightness + 100.0) / 100.0;
}
- d[RED_PIX] = colorize->final_red_lookup[lum];
- d[GREEN_PIX] = colorize->final_green_lookup[lum];
- d[BLUE_PIX] = colorize->final_blue_lookup[lum];
+ d[RED] = colorize->final_red_lookup[lum];
+ d[GREEN] = colorize->final_green_lookup[lum];
+ d[BLUE] = colorize->final_blue_lookup[lum];
if (alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
s += srcPR->bytes;
d += destPR->bytes;
Modified: trunk/app/base/desaturate.c
==============================================================================
--- trunk/app/base/desaturate.c (original)
+++ trunk/app/base/desaturate.c Sun Oct 19 13:47:09 2008
@@ -84,19 +84,19 @@
gint min, max;
gint lightness;
- max = MAX (s[RED_PIX], s[GREEN_PIX]);
- max = MAX (max, s[BLUE_PIX]);
- min = MIN (s[RED_PIX], s[GREEN_PIX]);
- min = MIN (min, s[BLUE_PIX]);
+ max = MAX (s[RED], s[GREEN]);
+ max = MAX (max, s[BLUE]);
+ min = MIN (s[RED], s[GREEN]);
+ min = MIN (min, s[BLUE]);
lightness = (max + min) / 2;
- d[RED_PIX] = lightness;
- d[GREEN_PIX] = lightness;
- d[BLUE_PIX] = lightness;
+ d[RED] = lightness;
+ d[GREEN] = lightness;
+ d[BLUE] = lightness;
if (has_alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
d += destPR->bytes;
s += srcPR->bytes;
@@ -124,16 +124,16 @@
for (j = 0; j < srcPR->w; j++)
{
- gint luminosity = GIMP_RGB_LUMINANCE (s[RED_PIX],
- s[GREEN_PIX],
- s[BLUE_PIX]) + 0.5;
-
- d[RED_PIX] = luminosity;
- d[GREEN_PIX] = luminosity;
- d[BLUE_PIX] = luminosity;
+ gint luminosity = GIMP_RGB_LUMINANCE (s[RED],
+ s[GREEN],
+ s[BLUE]) + 0.5;
+
+ d[RED] = luminosity;
+ d[GREEN] = luminosity;
+ d[BLUE] = luminosity;
if (has_alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
d += destPR->bytes;
s += srcPR->bytes;
@@ -161,14 +161,14 @@
for (j = 0; j < srcPR->w; j++)
{
- gint average = (s[RED_PIX] + s[GREEN_PIX] + s[BLUE_PIX] + 1) / 3;
+ gint average = (s[RED] + s[GREEN] + s[BLUE] + 1) / 3;
- d[RED_PIX] = average;
- d[GREEN_PIX] = average;
- d[BLUE_PIX] = average;
+ d[RED] = average;
+ d[GREEN] = average;
+ d[BLUE] = average;
if (has_alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
d += destPR->bytes;
s += srcPR->bytes;
Modified: trunk/app/base/hue-saturation.c
==============================================================================
--- trunk/app/base/hue-saturation.c (original)
+++ trunk/app/base/hue-saturation.c Sun Oct 19 13:47:09 2008
@@ -126,9 +126,9 @@
while (w--)
{
- r = s[RED_PIX];
- g = s[GREEN_PIX];
- b = s[BLUE_PIX];
+ r = s[RED];
+ g = s[GREEN];
+ b = s[BLUE];
gimp_rgb_to_hsl_int (&r, &g, &b);
@@ -194,12 +194,12 @@
gimp_hsl_to_rgb_int (&r, &g, &b);
- d[RED_PIX] = r;
- d[GREEN_PIX] = g;
- d[BLUE_PIX] = b;
+ d[RED] = r;
+ d[GREEN] = g;
+ d[BLUE] = b;
if (alpha)
- d[ALPHA_PIX] = s[ALPHA_PIX];
+ d[ALPHA] = s[ALPHA];
s += srcPR->bytes;
d += destPR->bytes;
Modified: trunk/app/base/siox.c
==============================================================================
--- trunk/app/base/siox.c (original)
+++ trunk/app/base/siox.c Sun Oct 19 13:47:09 2008
@@ -143,9 +143,9 @@
{
case 3: /* RGB */
case 4: /* RGBA */
- cpercep_rgb_to_space (src[RED_PIX],
- src[GREEN_PIX],
- src[BLUE_PIX], &l, &a, &b);
+ cpercep_rgb_to_space (src[RED],
+ src[GREEN],
+ src[BLUE], &l, &a, &b);
break;
case 2:
@@ -154,9 +154,9 @@
{
gint i = *src * 3;
- cpercep_rgb_to_space (colormap[i + RED_PIX],
- colormap[i + GREEN_PIX],
- colormap[i + BLUE_PIX], &l, &a, &b);
+ cpercep_rgb_to_space (colormap[i + RED],
+ colormap[i + GREEN],
+ colormap[i + BLUE], &l, &a, &b);
}
else /* GRAY(A) */
{
@@ -691,16 +691,16 @@
{
case 3: /* RGB */
case 4: /* RGBA */
- return (src[RED_PIX] << 16 | src[GREEN_PIX] << 8 | src[BLUE_PIX]);
+ return (src[RED] << 16 | src[GREEN] << 8 | src[BLUE]);
case 2:
case 1:
if (colormap) /* INDEXED(A) */
{
gint i = *src * 3;
- return (colormap[i + RED_PIX] << 16 |
- colormap[i + GREEN_PIX] << 8 |
- colormap[i + BLUE_PIX]);
+ return (colormap[i + RED] << 16 |
+ colormap[i + GREEN] << 8 |
+ colormap[i + BLUE]);
}
else /* GRAY(A) */
{
Modified: trunk/app/base/threshold.c
==============================================================================
--- trunk/app/base/threshold.c (original)
+++ trunk/app/base/threshold.c Sun Oct 19 13:47:09 2008
@@ -54,16 +54,16 @@
{
if (tr->color)
{
- value = MAX (s[RED_PIX], s[GREEN_PIX]);
- value = MAX (value, s[BLUE_PIX]);
+ value = MAX (s[RED], s[GREEN]);
+ value = MAX (value, s[BLUE]);
value = (value >= tr->low_threshold &&
value <= tr->high_threshold ) ? 255 : 0;
}
else
{
- value = (s[GRAY_PIX] >= tr->low_threshold &&
- s[GRAY_PIX] <= tr->high_threshold) ? 255 : 0;
+ value = (s[GRAY] >= tr->low_threshold &&
+ s[GRAY] <= tr->high_threshold) ? 255 : 0;
}
for (b = 0; b < alpha; b++)
Modified: trunk/app/core/gimp-edit.c
==============================================================================
--- trunk/app/core/gimp-edit.c (original)
+++ trunk/app/core/gimp-edit.c Sun Oct 19 13:47:09 2008
@@ -612,9 +612,9 @@
{
guchar tmp_col[MAX_CHANNELS];
- tmp_col[RED_PIX] = 255;
- tmp_col[GREEN_PIX] = 255;
- tmp_col[BLUE_PIX] = 255;
+ tmp_col[RED] = 255;
+ tmp_col[GREEN] = 255;
+ tmp_col[BLUE] = 255;
gimp_image_transform_color (image, drawable_type, col,
GIMP_RGB, tmp_col);
}
Modified: trunk/app/core/gimp-transform-region.c
==============================================================================
--- trunk/app/core/gimp-transform-region.c (original)
+++ trunk/app/core/gimp-transform-region.c Sun Oct 19 13:47:09 2008
@@ -210,18 +210,18 @@
switch (GIMP_IMAGE_TYPE_BASE_TYPE (pickable_type))
{
case GIMP_RGB:
- bg_color[ALPHA_PIX] = TRANSPARENT_OPACITY;
- alpha = ALPHA_PIX;
+ bg_color[ALPHA] = TRANSPARENT_OPACITY;
+ alpha = ALPHA;
break;
case GIMP_GRAY:
- bg_color[ALPHA_G_PIX] = TRANSPARENT_OPACITY;
- alpha = ALPHA_G_PIX;
+ bg_color[ALPHA_G] = TRANSPARENT_OPACITY;
+ alpha = ALPHA_G;
break;
case GIMP_INDEXED:
- bg_color[ALPHA_I_PIX] = TRANSPARENT_OPACITY;
- alpha = ALPHA_I_PIX;
+ bg_color[ALPHA_I] = TRANSPARENT_OPACITY;
+ alpha = ALPHA_I;
/* If the image is indexed color, ignore interpolation value */
interpolation_type = GIMP_INTERPOLATION_NONE;
break;
Modified: trunk/app/core/gimpchannel.c
==============================================================================
--- trunk/app/core/gimpchannel.c (original)
+++ trunk/app/core/gimpchannel.c Sun Oct 19 13:47:09 2008
@@ -767,8 +767,8 @@
gboolean *active)
{
/* Make sure that the alpha channel is not valid. */
- active[GRAY_PIX] = TRUE;
- active[ALPHA_G_PIX] = FALSE;
+ active[GRAY] = TRUE;
+ active[ALPHA_G] = FALSE;
}
static void
Modified: trunk/app/core/gimpdrawable-bucket-fill.c
==============================================================================
--- trunk/app/core/gimpdrawable-bucket-fill.c (original)
+++ trunk/app/core/gimpdrawable-bucket-fill.c Sun Oct 19 13:47:09 2008
@@ -157,9 +157,9 @@
guchar tmp_col[MAX_CHANNELS];
gimp_rgb_get_uchar (color,
- &tmp_col[RED_PIX],
- &tmp_col[GREEN_PIX],
- &tmp_col[BLUE_PIX]);
+ &tmp_col[RED],
+ &tmp_col[GREEN],
+ &tmp_col[BLUE]);
gimp_image_transform_color (image, gimp_drawable_type (drawable), col,
GIMP_RGB, tmp_col);
Modified: trunk/app/core/gimpdrawable-convert.c
==============================================================================
--- trunk/app/core/gimpdrawable-convert.c (original)
+++ trunk/app/core/gimpdrawable-convert.c Sun Oct 19 13:47:09 2008
@@ -84,9 +84,9 @@
for (col = 0; col < srcPR.w; col++)
{
- d[RED_PIX] = *s;
- d[GREEN_PIX] = *s;
- d[BLUE_PIX] = *s;
+ d[RED] = *s;
+ d[GREEN] = *s;
+ d[BLUE] = *s;
d += 3;
s++;
@@ -116,9 +116,9 @@
for (col = 0; col < srcPR.w; col++)
{
offset = *s++ * 3;
- d[RED_PIX] = cmap[offset + 0];
- d[GREEN_PIX] = cmap[offset + 1];
- d[BLUE_PIX] = cmap[offset + 2];
+ d[RED] = cmap[offset + 0];
+ d[GREEN] = cmap[offset + 1];
+ d[BLUE] = cmap[offset + 2];
d += 3;
if (has_alpha)
@@ -186,9 +186,9 @@
d = dest;
for (col = 0; col < srcPR.w; col++)
{
- val = GIMP_RGB_LUMINANCE (s[RED_PIX],
- s[GREEN_PIX],
- s[BLUE_PIX]) + 0.5;
+ val = GIMP_RGB_LUMINANCE (s[RED],
+ s[GREEN],
+ s[BLUE]) + 0.5;
*d++ = (guchar) val;
s += 3;
if (has_alpha)
Modified: trunk/app/core/gimpdrawable-stroke.c
==============================================================================
--- trunk/app/core/gimpdrawable-stroke.c (original)
+++ trunk/app/core/gimpdrawable-stroke.c Sun Oct 19 13:47:09 2008
@@ -287,9 +287,9 @@
guchar col[MAX_CHANNELS] = { 0, };
gimp_rgb_get_uchar (&context->foreground,
- &tmp_col[RED_PIX],
- &tmp_col[GREEN_PIX],
- &tmp_col[BLUE_PIX]);
+ &tmp_col[RED],
+ &tmp_col[GREEN],
+ &tmp_col[BLUE]);
gimp_image_transform_color (image, gimp_drawable_type (drawable), col,
GIMP_RGB, tmp_col);
Modified: trunk/app/core/gimpdrawable.c
==============================================================================
--- trunk/app/core/gimpdrawable.c (original)
+++ trunk/app/core/gimpdrawable.c Sun Oct 19 13:47:09 2008
@@ -1253,15 +1253,15 @@
guchar c[MAX_CHANNELS];
gimp_rgba_get_uchar (color,
- &tmp[RED_PIX],
- &tmp[GREEN_PIX],
- &tmp[BLUE_PIX],
- &tmp[ALPHA_PIX]);
+ &tmp[RED],
+ &tmp[GREEN],
+ &tmp[BLUE],
+ &tmp[ALPHA]);
gimp_image_transform_color (image, drawable_type, c, GIMP_RGB, tmp);
if (GIMP_IMAGE_TYPE_HAS_ALPHA (drawable_type))
- c[GIMP_IMAGE_TYPE_BYTES (drawable_type) - 1] = tmp[ALPHA_PIX];
+ c[GIMP_IMAGE_TYPE_BYTES (drawable_type) - 1] = tmp[ALPHA];
else
c[GIMP_IMAGE_TYPE_BYTES (drawable_type)] = OPAQUE_OPACITY;
Modified: trunk/app/core/gimpimage-convert.c
==============================================================================
--- trunk/app/core/gimpimage-convert.c (original)
+++ trunk/app/core/gimpimage-convert.c Sun Oct 19 13:47:09 2008
@@ -713,8 +713,8 @@
{
while (pixels--)
{
- if (src[ALPHA_I_PIX])
- dest[INDEXED_PIX] = remap_table[src[INDEXED_PIX]];
+ if (src[ALPHA_I])
+ dest[INDEXED] = remap_table[src[INDEXED]];
src += srcPR.bytes;
dest += destPR.bytes;
@@ -724,7 +724,7 @@
{
while (pixels--)
{
- dest[INDEXED_PIX] = remap_table[src[INDEXED_PIX]];
+ dest[INDEXED] = remap_table[src[INDEXED]];
src += srcPR.bytes;
dest += destPR.bytes;
@@ -1135,7 +1135,7 @@
{
while (size--)
{
- if (data[ALPHA_G_PIX] > 127)
+ if (data[ALPHA_G] > 127)
histogram[*data]++;
data += srcPR.bytes;
@@ -1216,16 +1216,16 @@
gboolean transparent = FALSE;
if (has_alpha &&
- data[ALPHA_PIX] <
+ data[ALPHA] <
DM[col & DM_WIDTHMASK][row & DM_HEIGHTMASK])
transparent = TRUE;
if (! transparent)
{
colfreq = HIST_RGB (histogram,
- data[RED_PIX],
- data[GREEN_PIX],
- data[BLUE_PIX]);
+ data[RED],
+ data[GREEN],
+ data[BLUE]);
(*colfreq)++;
}
@@ -1243,13 +1243,13 @@
{
while (size--)
{
- if ((has_alpha && ((data[ALPHA_PIX] > 127)))
+ if ((has_alpha && ((data[ALPHA] > 127)))
|| (!has_alpha))
{
colfreq = HIST_RGB (histogram,
- data[RED_PIX],
- data[GREEN_PIX],
- data[BLUE_PIX]);
+ data[RED],
+ data[GREEN],
+ data[BLUE]);
(*colfreq)++;
}
data += srcPR.bytes;
@@ -1270,22 +1270,22 @@
{
if (alpha_dither)
{
- if (data[ALPHA_PIX] <
+ if (data[ALPHA] <
DM[col & DM_WIDTHMASK][row & DM_HEIGHTMASK])
transparent = TRUE;
}
else
{
- if (data[ALPHA_PIX] <= 127)
+ if (data[ALPHA] <= 127)
transparent = TRUE;
}
}
if (! transparent)
{
colfreq = HIST_RGB (histogram,
- data[RED_PIX],
- data[GREEN_PIX],
- data[BLUE_PIX]);
+ data[RED],
+ data[GREEN],
+ data[BLUE]);
(*colfreq)++;
if (!needs_quantize)
@@ -1295,11 +1295,11 @@
nfc_iter++)
{
if (
- (data[RED_PIX] == found_cols[nfc_iter][0])
+ (data[RED] == found_cols[nfc_iter][0])
&&
- (data[GREEN_PIX] == found_cols[nfc_iter][1])
+ (data[GREEN] == found_cols[nfc_iter][1])
&&
- (data[BLUE_PIX] == found_cols[nfc_iter][2])
+ (data[BLUE] == found_cols[nfc_iter][2])
)
goto already_found;
}
@@ -1325,9 +1325,9 @@
{
/* Remember the new colour we just found.
*/
- found_cols[num_found_cols-1][0] = data[RED_PIX];
- found_cols[num_found_cols-1][1] = data[GREEN_PIX];
- found_cols[num_found_cols-1][2] = data[BLUE_PIX];
+ found_cols[num_found_cols-1][0] = data[RED];
+ found_cols[num_found_cols-1][1] = data[GREEN];
+ found_cols[num_found_cols-1][2] = data[BLUE];
}
}
}
@@ -2797,7 +2797,7 @@
for (col = 0; col < srcPR.w; col++)
{
/* get pixel value and index into the cache */
- pixel = src[GRAY_PIX];
+ pixel = src[GRAY];
cachep = &histogram[pixel];
/* If we have not seen this color before, find nearest colormap entry */
/* and update the cache */
@@ -2813,29 +2813,29 @@
gint dither_x = (col+offsetx+srcPR.x) & DM_WIDTHMASK;
gint dither_y = (row+offsety+srcPR.y) & DM_HEIGHTMASK;
- if ((src[ALPHA_G_PIX]) < DM[dither_x][dither_y])
+ if ((src[ALPHA_G]) < DM[dither_x][dither_y])
transparent = TRUE;
}
else
{
- if (src[ALPHA_G_PIX] <= 127)
+ if (src[ALPHA_G] <= 127)
transparent = TRUE;
}
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
}
else
{
- dest[ALPHA_I_PIX] = 255;
- index_used_count[dest[INDEXED_PIX] = *cachep - 1]++;
+ dest[ALPHA_I] = 255;
+ index_used_count[dest[INDEXED] = *cachep - 1]++;
}
}
else
{
/* Now emit the colormap index for this cell */
- index_used_count[dest[INDEXED_PIX] = *cachep - 1]++;
+ index_used_count[dest[INDEXED] = *cachep - 1]++;
}
src += srcPR.bytes;
@@ -2898,7 +2898,7 @@
[(row+offsety+srcPR.y) & DM_HEIGHTMASK];
/* get pixel value and index into the cache */
- pixel = src[GRAY_PIX];
+ pixel = src[GRAY];
cachep = &histogram[pixel];
/* If we have not seen this color before, find nearest colormap entry */
/* and update the cache */
@@ -2909,8 +2909,8 @@
color1 = &quantobj->cmap[pixval1];
if (quantobj->actual_number_of_colors > 2) {
- const int re = src[GRAY_PIX] - (int)color1->red;
- int RV = src[GRAY_PIX] + re;
+ const int re = src[GRAY] - (int)color1->red;
+ int RV = src[GRAY] + re;
do {
const gint R = CLAMP0255(RV);
cachep = &histogram[R];
@@ -2944,8 +2944,8 @@
color2 = &quantobj->cmap[pixval2];
- err1 = ABS(color1->red - src[GRAY_PIX]);
- err2 = ABS(color2->red - src[GRAY_PIX]);
+ err1 = ABS(color1->red - src[GRAY]);
+ err2 = ABS(color2->red - src[GRAY]);
if (err1 || err2) {
const int proportion2 = (256 * 255 * err2) / (err1 + err2);
if ((dmval * 256) > proportion2) {
@@ -2959,29 +2959,29 @@
if (alpha_dither)
{
- if ((src[ALPHA_G_PIX] << 6) < (255 * dmval))
+ if ((src[ALPHA_G] << 6) < (255 * dmval))
transparent = TRUE;
}
else
{
- if (src[ALPHA_G_PIX] <= 127)
+ if (src[ALPHA_G] <= 127)
transparent = TRUE;
}
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
}
else
{
- dest[ALPHA_I_PIX] = 255;
- index_used_count[dest[INDEXED_PIX] = pixval1]++;
+ dest[ALPHA_I] = 255;
+ index_used_count[dest[INDEXED] = pixval1]++;
}
}
else
{
/* Now emit the colormap index for this cell, barfbarf */
- index_used_count[dest[INDEXED_PIX] = pixval1]++;
+ index_used_count[dest[INDEXED] = pixval1]++;
}
src += srcPR.bytes;
@@ -3005,10 +3005,10 @@
gint row, col;
gboolean has_alpha;
gpointer pr;
- gint red_pix = RED_PIX;
- gint green_pix = GREEN_PIX;
- gint blue_pix = BLUE_PIX;
- gint alpha_pix = ALPHA_PIX;
+ gint red_pix = RED;
+ gint green_pix = GREEN;
+ gint blue_pix = BLUE;
+ gint alpha_pix = ALPHA;
gboolean alpha_dither = quantobj->want_alpha_dither;
gint offsetx, offsety;
gulong *index_used_count = quantobj->index_used_count;
@@ -3025,8 +3025,8 @@
*/
if (gimp_drawable_is_gray (GIMP_DRAWABLE (layer)))
{
- red_pix = green_pix = blue_pix = GRAY_PIX;
- alpha_pix = ALPHA_G_PIX;
+ red_pix = green_pix = blue_pix = GRAY;
+ alpha_pix = ALPHA_G;
}
has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
@@ -3077,12 +3077,12 @@
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
goto next_pixel;
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
@@ -3096,7 +3096,7 @@
fill_inverse_cmap_rgb (quantobj, histogram, R, G, B);
/* Now emit the colormap index for this cell, barfbarf */
- index_used_count[dest[INDEXED_PIX] = *cachep - 1]++;
+ index_used_count[dest[INDEXED] = *cachep - 1]++;
next_pixel:
@@ -3130,10 +3130,10 @@
gint row, col;
gboolean has_alpha;
gpointer pr;
- gint red_pix = RED_PIX;
- gint green_pix = GREEN_PIX;
- gint blue_pix = BLUE_PIX;
- gint alpha_pix = ALPHA_PIX;
+ gint red_pix = RED;
+ gint green_pix = GREEN;
+ gint blue_pix = BLUE;
+ gint alpha_pix = ALPHA;
gboolean alpha_dither = quantobj->want_alpha_dither;
gint offsetx, offsety;
gulong *index_used_count = quantobj->index_used_count;
@@ -3150,8 +3150,8 @@
*/
if (gimp_drawable_is_gray (GIMP_DRAWABLE (layer)))
{
- red_pix = green_pix = blue_pix = GRAY_PIX;
- alpha_pix = ALPHA_G_PIX;
+ red_pix = green_pix = blue_pix = GRAY;
+ alpha_pix = ALPHA_G;
}
has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
@@ -3204,12 +3204,12 @@
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
goto next_pixel;
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
@@ -3307,7 +3307,7 @@
}
/* Now emit the colormap index for this cell, barfbarf */
- index_used_count[dest[INDEXED_PIX] = pixval1]++;
+ index_used_count[dest[INDEXED] = pixval1]++;
next_pixel:
@@ -3335,10 +3335,10 @@
gboolean has_alpha;
gboolean alpha_dither = quantobj->want_alpha_dither;
gpointer pr;
- gint red_pix = RED_PIX;
- gint green_pix = GREEN_PIX;
- gint blue_pix = BLUE_PIX;
- gint alpha_pix = ALPHA_PIX;
+ gint red_pix = RED;
+ gint green_pix = GREEN;
+ gint blue_pix = BLUE;
+ gint alpha_pix = ALPHA;
gint i;
gint lastindex = 0;
gint lastred = -1;
@@ -3397,9 +3397,9 @@
(lastblue == src[blue_pix]))
{
/* same pixel colour as last time */
- dest[INDEXED_PIX] = lastindex;
+ dest[INDEXED] = lastindex;
if (has_alpha)
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
else
{
@@ -3423,14 +3423,14 @@
g_error ("Non-existant colour was expected to "
"be in non-destructive colourmap.");
got_colour:
- dest[INDEXED_PIX] = lastindex;
+ dest[INDEXED] = lastindex;
if (has_alpha)
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
else
{ /* have alpha, and transparent */
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
}
src += srcPR.bytes;
@@ -3630,7 +3630,7 @@
for (col = 0; col < width; col++)
{
- pixel = range_limiter[src[GRAY_PIX] + error_limiter[*pr]];
+ pixel = range_limiter[src[GRAY] + error_limiter[*pr]];
cachep = &histogram[pixel];
/* If we have not seen this color before, find nearest colormap entry */
@@ -3649,18 +3649,18 @@
gint dither_x = ((width-col)+offsetx-1) & DM_WIDTHMASK;
gint dither_y = (row+offsety) & DM_HEIGHTMASK;
- if ((src[ALPHA_G_PIX]) < DM[dither_x][dither_y])
+ if ((src[ALPHA_G]) < DM[dither_x][dither_y])
transparent = TRUE;
}
else
{
- if (src[ALPHA_G_PIX] <= 127)
+ if (src[ALPHA_G] <= 127)
transparent = TRUE;
}
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
pr--;
nr--;
*(nr - 1) = 0;
@@ -3668,7 +3668,7 @@
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
else
@@ -3678,18 +3678,18 @@
gint dither_x = (col+offsetx) & DM_WIDTHMASK;
gint dither_y = (row+offsety) & DM_HEIGHTMASK;
- if ((src[ALPHA_G_PIX]) < DM[dither_x][dither_y])
+ if ((src[ALPHA_G]) < DM[dither_x][dither_y])
transparent = TRUE;
}
else
{
- if (src[ALPHA_G_PIX] <= 127)
+ if (src[ALPHA_G] <= 127)
transparent = TRUE;
}
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
pr++;
nr++;
*(nr + 1) = 0;
@@ -3697,13 +3697,13 @@
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
}
index = *cachep - 1;
- index_used_count[dest[INDEXED_PIX] = index]++;
+ index_used_count[dest[INDEXED] = index]++;
color = &quantobj->cmap[index];
pixele = pixel - color->red;
@@ -3807,10 +3807,10 @@
gint odd_row;
gboolean has_alpha;
gint width, height;
- gint red_pix = RED_PIX;
- gint green_pix = GREEN_PIX;
- gint blue_pix = BLUE_PIX;
- gint alpha_pix = ALPHA_PIX;
+ gint red_pix = RED;
+ gint green_pix = GREEN;
+ gint blue_pix = BLUE;
+ gint alpha_pix = ALPHA;
gint offsetx, offsety;
gboolean alpha_dither = quantobj->want_alpha_dither;
gulong *index_used_count = quantobj->index_used_count;
@@ -3826,7 +3826,7 @@
* grayscale drawables through the rgb pass2 functions
*/
if (gimp_drawable_is_gray (GIMP_DRAWABLE (layer)))
- red_pix = green_pix = blue_pix = GRAY_PIX;
+ red_pix = green_pix = blue_pix = GRAY;
has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
@@ -3944,7 +3944,7 @@
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
rpr--; gpr--; bpr--;
rnr--; gnr--; bnr--;
*(rnr - 1) = *(gnr - 1) = *(bnr - 1) = 0;
@@ -3952,7 +3952,7 @@
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
else
@@ -3973,7 +3973,7 @@
if (transparent)
{
- dest[ALPHA_I_PIX] = 0;
+ dest[ALPHA_I] = 0;
rpr++; gpr++; bpr++;
rnr++; gnr++; bnr++;
*(rnr + 1) = *(gnr + 1) = *(bnr + 1) = 0;
@@ -3981,7 +3981,7 @@
}
else
{
- dest[ALPHA_I_PIX] = 255;
+ dest[ALPHA_I] = 255;
}
}
}
@@ -4025,7 +4025,7 @@
index = *cachep - 1;
index_used_count[index]++;
- dest[INDEXED_PIX] = index;
+ dest[INDEXED] = index;
/*if (re > global_rmax)
re = (re + 3*global_rmax) / 4;
Modified: trunk/app/core/gimpimage.c
==============================================================================
--- trunk/app/core/gimpimage.c (original)
+++ trunk/app/core/gimpimage.c Sun Oct 19 13:47:09 2008
@@ -1661,17 +1661,17 @@
switch (channel)
{
- case GIMP_RED_CHANNEL: return RED_PIX;
- case GIMP_GREEN_CHANNEL: return GREEN_PIX;
- case GIMP_BLUE_CHANNEL: return BLUE_PIX;
- case GIMP_GRAY_CHANNEL: return GRAY_PIX;
- case GIMP_INDEXED_CHANNEL: return INDEXED_PIX;
+ case GIMP_RED_CHANNEL: return RED;
+ case GIMP_GREEN_CHANNEL: return GREEN;
+ case GIMP_BLUE_CHANNEL: return BLUE;
+ case GIMP_GRAY_CHANNEL: return GRAY;
+ case GIMP_INDEXED_CHANNEL: return INDEXED;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (image))
{
- case GIMP_RGB: return ALPHA_PIX;
- case GIMP_GRAY: return ALPHA_G_PIX;
- case GIMP_INDEXED: return ALPHA_I_PIX;
+ case GIMP_RGB: return ALPHA;
+ case GIMP_GRAY: return ALPHA_G;
+ case GIMP_INDEXED: return ALPHA_I;
}
}
@@ -2220,18 +2220,18 @@
case GIMP_GRAY_IMAGE:
case GIMP_GRAYA_IMAGE:
/* NTSC conversion */
- *dest = GIMP_RGB_LUMINANCE (src[RED_PIX],
- src[GREEN_PIX],
- src[BLUE_PIX]) + 0.5;
+ *dest = GIMP_RGB_LUMINANCE (src[RED],
+ src[GREEN],
+ src[BLUE]) + 0.5;
break;
case GIMP_INDEXED_IMAGE:
case GIMP_INDEXEDA_IMAGE:
/* Least squares method */
*dest = gimp_image_color_hash_rgb_to_indexed (dest_image,
- src[RED_PIX],
- src[GREEN_PIX],
- src[BLUE_PIX]);
+ src[RED],
+ src[GREEN],
+ src[BLUE]);
break;
}
break;
@@ -2257,9 +2257,9 @@
case GIMP_INDEXEDA_IMAGE:
/* Least squares method */
*dest = gimp_image_color_hash_rgb_to_indexed (dest_image,
- src[GRAY_PIX],
- src[GRAY_PIX],
- src[GRAY_PIX]);
+ src[GRAY],
+ src[GRAY],
+ src[GRAY]);
break;
}
break;
Modified: trunk/app/core/gimppalette-import.c
==============================================================================
--- trunk/app/core/gimppalette-import.c (original)
+++ trunk/app/core/gimppalette-import.c Sun Oct 19 13:47:09 2008
@@ -323,7 +323,7 @@
gimp_image_get_color (image, type, idata, rgba);
/* ignore completely transparent pixels */
- if (rgba[ALPHA_PIX])
+ if (rgba[ALPHA])
{
guchar rgb_real[MAX_CHANNELS];
Modified: trunk/app/core/gimppickable.c
==============================================================================
--- trunk/app/core/gimppickable.c (original)
+++ trunk/app/core/gimppickable.c Sun Oct 19 13:47:09 2008
@@ -227,16 +227,16 @@
gimp_image_get_color (image, type, pixel, col);
- color_avg[RED_PIX] += col[RED_PIX];
- color_avg[GREEN_PIX] += col[GREEN_PIX];
- color_avg[BLUE_PIX] += col[BLUE_PIX];
- color_avg[ALPHA_PIX] += col[ALPHA_PIX];
+ color_avg[RED] += col[RED];
+ color_avg[GREEN] += col[GREEN];
+ color_avg[BLUE] += col[BLUE];
+ color_avg[ALPHA] += col[ALPHA];
}
- col[RED_PIX] = (guchar) ((color_avg[RED_PIX] + count / 2) / count);
- col[GREEN_PIX] = (guchar) ((color_avg[GREEN_PIX] + count / 2) / count);
- col[BLUE_PIX] = (guchar) ((color_avg[BLUE_PIX] + count / 2) / count);
- col[ALPHA_PIX] = (guchar) ((color_avg[ALPHA_PIX] + count / 2) / count);
+ col[RED] = (guchar) ((color_avg[RED] + count / 2) / count);
+ col[GREEN] = (guchar) ((color_avg[GREEN] + count / 2) / count);
+ col[BLUE] = (guchar) ((color_avg[BLUE] + count / 2) / count);
+ col[ALPHA] = (guchar) ((color_avg[ALPHA] + count / 2) / count);
}
else
{
@@ -245,10 +245,10 @@
gimp_rgba_set_uchar (color,
- col[RED_PIX],
- col[GREEN_PIX],
- col[BLUE_PIX],
- col[ALPHA_PIX]);
+ col[RED],
+ col[GREEN],
+ col[BLUE],
+ col[ALPHA]);
if (color_index)
{
Modified: trunk/app/gegl/gimpoperationantierasemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationantierasemode.c (original)
+++ trunk/app/gegl/gimpoperationantierasemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationbehindmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationbehindmode.c (original)
+++ trunk/app/gegl/gimpoperationbehindmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationburnmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationburnmode.c (original)
+++ trunk/app/gegl/gimpoperationburnmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationcolorbalance.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorbalance.c (original)
+++ trunk/app/gegl/gimpoperationcolorbalance.c Sun Oct 19 13:47:09 2008
@@ -129,9 +129,9 @@
while (samples--)
{
- gfloat r = src[RED_PIX];
- gfloat g = src[GREEN_PIX];
- gfloat b = src[BLUE_PIX];
+ gfloat r = src[RED];
+ gfloat g = src[GREEN];
+ gfloat b = src[BLUE];
gfloat r_n;
gfloat g_n;
gfloat b_n;
@@ -176,10 +176,10 @@
b_n = rgb.b;
}
- dest[RED_PIX] = r_n;
- dest[GREEN_PIX] = g_n;
- dest[BLUE_PIX] = b_n;
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = r_n;
+ dest[GREEN] = g_n;
+ dest[BLUE] = b_n;
+ dest[ALPHA] = src[ALPHA];
src += 4;
dest += 4;
Modified: trunk/app/gegl/gimpoperationcolorerasemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorerasemode.c (original)
+++ trunk/app/gegl/gimpoperationcolorerasemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationcolorize.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorize.c (original)
+++ trunk/app/gegl/gimpoperationcolorize.c Sun Oct 19 13:47:09 2008
@@ -97,9 +97,9 @@
while (samples--)
{
GimpRGB rgb;
- gfloat lum = GIMP_RGB_LUMINANCE (src[RED_PIX],
- src[GREEN_PIX],
- src[BLUE_PIX]);
+ gfloat lum = GIMP_RGB_LUMINANCE (src[RED],
+ src[GREEN],
+ src[BLUE]);
if (config->lightness > 0)
{
@@ -121,10 +121,10 @@
* don't repeat this bug here (this is the reason why the gegl
* colorize is brighter than the legacy one).
*/
- dest[RED_PIX] = rgb.r; /* * lum; */
- dest[GREEN_PIX] = rgb.g; /* * lum; */
- dest[BLUE_PIX] = rgb.b; /* * lum */;
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = rgb.r; /* * lum; */
+ dest[GREEN] = rgb.g; /* * lum; */
+ dest[BLUE] = rgb.b; /* * lum */;
+ dest[ALPHA] = src[ALPHA];
src += 4;
dest += 4;
Modified: trunk/app/gegl/gimpoperationcolormode.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolormode.c (original)
+++ trunk/app/gegl/gimpoperationcolormode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationdarkenonlymode.c
==============================================================================
--- trunk/app/gegl/gimpoperationdarkenonlymode.c (original)
+++ trunk/app/gegl/gimpoperationdarkenonlymode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationdifferencemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationdifferencemode.c (original)
+++ trunk/app/gegl/gimpoperationdifferencemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationdissolvemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationdissolvemode.c (original)
+++ trunk/app/gegl/gimpoperationdissolvemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationdividemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationdividemode.c (original)
+++ trunk/app/gegl/gimpoperationdividemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationdodgemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationdodgemode.c (original)
+++ trunk/app/gegl/gimpoperationdodgemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationerasemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationerasemode.c (original)
+++ trunk/app/gegl/gimpoperationerasemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationgrainextractmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationgrainextractmode.c (original)
+++ trunk/app/gegl/gimpoperationgrainextractmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationgrainmergemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationgrainmergemode.c (original)
+++ trunk/app/gegl/gimpoperationgrainmergemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationhardlightmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationhardlightmode.c (original)
+++ trunk/app/gegl/gimpoperationhardlightmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationhuemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationhuemode.c (original)
+++ trunk/app/gegl/gimpoperationhuemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationhuesaturation.c
==============================================================================
--- trunk/app/gegl/gimpoperationhuesaturation.c (original)
+++ trunk/app/gegl/gimpoperationhuesaturation.c Sun Oct 19 13:47:09 2008
@@ -154,9 +154,9 @@
gfloat primary_intensity = 0.0;
gfloat secondary_intensity = 0.0;
- rgb.r = src[RED_PIX];
- rgb.g = src[GREEN_PIX];
- rgb.b = src[BLUE_PIX];
+ rgb.r = src[RED];
+ rgb.g = src[GREEN];
+ rgb.b = src[BLUE];
gimp_rgb_to_hsl (&rgb, &hsl);
@@ -245,10 +245,10 @@
gimp_hsl_to_rgb (&hsl, &rgb);
- dest[RED_PIX] = rgb.r;
- dest[GREEN_PIX] = rgb.g;
- dest[BLUE_PIX] = rgb.b;
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = rgb.r;
+ dest[GREEN] = rgb.g;
+ dest[BLUE] = rgb.b;
+ dest[ALPHA] = src[ALPHA];
src += 4;
dest += 4;
Modified: trunk/app/gegl/gimpoperationlevels.c
==============================================================================
--- trunk/app/gegl/gimpoperationlevels.c (original)
+++ trunk/app/gegl/gimpoperationlevels.c Sun Oct 19 13:47:09 2008
@@ -145,7 +145,7 @@
config->high_output[channel + 1]);
/* don't apply the overall curve to the alpha channel */
- if (channel != ALPHA_PIX)
+ if (channel != ALPHA)
value = gimp_operation_levels_map (value,
inv_gamma[0],
config->low_input[0],
Modified: trunk/app/gegl/gimpoperationlightenonlymode.c
==============================================================================
--- trunk/app/gegl/gimpoperationlightenonlymode.c (original)
+++ trunk/app/gegl/gimpoperationlightenonlymode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationmultiplymode.c
==============================================================================
--- trunk/app/gegl/gimpoperationmultiplymode.c (original)
+++ trunk/app/gegl/gimpoperationmultiplymode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationoverlaymode.c
==============================================================================
--- trunk/app/gegl/gimpoperationoverlaymode.c (original)
+++ trunk/app/gegl/gimpoperationoverlaymode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationposterize.c
==============================================================================
--- trunk/app/gegl/gimpoperationposterize.c (original)
+++ trunk/app/gegl/gimpoperationposterize.c Sun Oct 19 13:47:09 2008
@@ -96,10 +96,10 @@
while (samples--)
{
- dest[RED_PIX] = RINT (src[RED_PIX] * levels) / levels;
- dest[GREEN_PIX] = RINT (src[GREEN_PIX] * levels) / levels;
- dest[BLUE_PIX] = RINT (src[BLUE_PIX] * levels) / levels;
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = RINT (src[RED] * levels) / levels;
+ dest[GREEN] = RINT (src[GREEN] * levels) / levels;
+ dest[BLUE] = RINT (src[BLUE] * levels) / levels;
+ dest[ALPHA] = src[ALPHA];
src += 4;
dest += 4;
Modified: trunk/app/gegl/gimpoperationreplacemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationreplacemode.c (original)
+++ trunk/app/gegl/gimpoperationreplacemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationsaturationmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationsaturationmode.c (original)
+++ trunk/app/gegl/gimpoperationsaturationmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationscreenmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationscreenmode.c (original)
+++ trunk/app/gegl/gimpoperationscreenmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationsoftlightmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationsoftlightmode.c (original)
+++ trunk/app/gegl/gimpoperationsoftlightmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationsubtractmode.c
==============================================================================
--- trunk/app/gegl/gimpoperationsubtractmode.c (original)
+++ trunk/app/gegl/gimpoperationsubtractmode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/gegl/gimpoperationthreshold.c
==============================================================================
--- trunk/app/gegl/gimpoperationthreshold.c (original)
+++ trunk/app/gegl/gimpoperationthreshold.c Sun Oct 19 13:47:09 2008
@@ -94,15 +94,15 @@
{
gfloat value;
- value = MAX (src[RED_PIX], src[GREEN_PIX]);
- value = MAX (value, src[BLUE_PIX]);
+ value = MAX (src[RED], src[GREEN]);
+ value = MAX (value, src[BLUE]);
value = (value >= config->low && value <= config->high) ? 1.0 : 0.0;
- dest[RED_PIX] = value;
- dest[GREEN_PIX] = value;
- dest[BLUE_PIX] = value;
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = value;
+ dest[GREEN] = value;
+ dest[BLUE] = value;
+ dest[ALPHA] = src[ALPHA];
src += 4;
dest += 4;
Modified: trunk/app/gegl/gimpoperationvaluemode.c
==============================================================================
--- trunk/app/gegl/gimpoperationvaluemode.c (original)
+++ trunk/app/gegl/gimpoperationvaluemode.c Sun Oct 19 13:47:09 2008
@@ -71,10 +71,10 @@
while (samples--)
{
- dest[RED_PIX] = src[RED_PIX];
- dest[GREEN_PIX] = src[GREEN_PIX];
- dest[BLUE_PIX] = src[BLUE_PIX];
- dest[ALPHA_PIX] = src[ALPHA_PIX];
+ dest[RED] = src[RED];
+ dest[GREEN] = src[GREEN];
+ dest[BLUE] = src[BLUE];
+ dest[ALPHA] = src[ALPHA];
src += 4;
aux += 4;
Modified: trunk/app/paint-funcs/subsample-region.c
==============================================================================
--- trunk/app/paint-funcs/subsample-region.c (original)
+++ trunk/app/paint-funcs/subsample-region.c Sun Oct 19 13:47:09 2008
@@ -343,21 +343,21 @@
/* transform the color to RGB */
if (has_alpha)
{
- if (s[ALPHA_I_PIX] & 0x80)
+ if (s[ALPHA_I] & 0x80)
{
- r[RED_PIX] += cmap[index++] * tot_frac;
- r[GREEN_PIX] += cmap[index++] * tot_frac;
- r[BLUE_PIX] += cmap[index++] * tot_frac;
- r[ALPHA_PIX] += tot_frac;
+ r[RED] += cmap[index++] * tot_frac;
+ r[GREEN] += cmap[index++] * tot_frac;
+ r[BLUE] += cmap[index++] * tot_frac;
+ r[ALPHA] += tot_frac;
}
/* else the pixel contributes nothing and needs not to be added
*/
}
else
{
- r[RED_PIX] += cmap[index++] * tot_frac;
- r[GREEN_PIX] += cmap[index++] * tot_frac;
- r[BLUE_PIX] += cmap[index++] * tot_frac;
+ r[RED] += cmap[index++] * tot_frac;
+ r[GREEN] += cmap[index++] * tot_frac;
+ r[BLUE] += cmap[index++] * tot_frac;
}
/* increment the destination */
Modified: trunk/app/paint/gimpclone.c
==============================================================================
--- trunk/app/paint/gimpclone.c (original)
+++ trunk/app/paint/gimpclone.c Sun Oct 19 13:47:09 2008
@@ -282,7 +282,7 @@
gimp_image_transform_color (dest_image, dest_type, d,
GIMP_RGB, rgba);
- d[alpha] = rgba[ALPHA_PIX];
+ d[alpha] = rgba[ALPHA];
s += src_bytes;
d += dest_bytes;
Modified: trunk/app/paint/gimppaintbrush.c
==============================================================================
--- trunk/app/paint/gimppaintbrush.c (original)
+++ trunk/app/paint/gimppaintbrush.c Sun Oct 19 13:47:09 2008
@@ -140,10 +140,10 @@
opacity *= gradient_color.a;
gimp_rgb_get_uchar (&gradient_color,
- &col[RED_PIX],
- &col[GREEN_PIX],
- &col[BLUE_PIX]);
- col[ALPHA_PIX] = OPAQUE_OPACITY;
+ &col[RED],
+ &col[GREEN],
+ &col[BLUE]);
+ col[ALPHA] = OPAQUE_OPACITY;
color_pixels (temp_buf_data (area), col,
area->width * area->height,
Modified: trunk/app/widgets/gimpviewrenderer.c
==============================================================================
--- trunk/app/widgets/gimpviewrenderer.c (original)
+++ trunk/app/widgets/gimpviewrenderer.c Sun Oct 19 13:47:09 2008
@@ -960,17 +960,17 @@
{
if (color)
{
- red_component = RED_PIX;
- green_component = GREEN_PIX;
- blue_component = BLUE_PIX;
- alpha_component = ALPHA_PIX;
+ red_component = RED;
+ green_component = GREEN;
+ blue_component = BLUE;
+ alpha_component = ALPHA;
}
else
{
- red_component = GRAY_PIX;
- green_component = GRAY_PIX;
- blue_component = GRAY_PIX;
- alpha_component = ALPHA_G_PIX;
+ red_component = GRAY;
+ green_component = GRAY;
+ blue_component = GRAY;
+ alpha_component = ALPHA_G;
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]