[gimp/goat-invasion: 162/234] app: remove extract_from_region() and its helper functions
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 162/234] app: remove extract_from_region() and its helper functions
- Date: Fri, 23 Mar 2012 12:07:00 +0000 (UTC)
commit d2ece02cb593b425905343b7141c4583d9ee4b27
Author: Michael Natterer <mitch gimp org>
Date: Tue Mar 20 15:06:21 2012 +0100
app: remove extract_from_region() and its helper functions
app/paint-funcs/paint-funcs.c | 136 -----------------------------------------
app/paint-funcs/paint-funcs.h | 34 ----------
2 files changed, 0 insertions(+), 170 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c
index 632d3d0..7263f19 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -1639,97 +1639,6 @@ color_erase_inten_pixels (const guchar *src1,
}
-void
-extract_from_inten_pixels (guchar *src,
- guchar *dest,
- const guchar *mask,
- const guchar *bg,
- gboolean cut,
- guint length,
- guint src_bytes,
- guint dest_bytes)
-{
- const gint alpha = HAS_ALPHA (src_bytes) ? src_bytes - 1 : src_bytes;
- const guchar *m = mask ? mask : &no_mask;
- gint b;
- gint tmp;
-
- while (length --)
- {
- for (b = 0; b < alpha; b++)
- dest[b] = src[b];
-
- if (HAS_ALPHA (src_bytes))
- {
- dest[alpha] = INT_MULT (*m, src[alpha], tmp);
- if (cut)
- src[alpha] = INT_MULT ((255 - *m), src[alpha], tmp);
- }
- else
- {
- if (HAS_ALPHA (dest_bytes))
- dest[alpha] = *m;
-
- if (cut)
- for (b = 0; b < src_bytes; b++)
- src[b] = INT_BLEND (bg[b], src[b], *m, tmp);
- }
-
- if (mask)
- m++;
-
- src += src_bytes;
- dest += dest_bytes;
- }
-}
-
-
-void
-extract_from_indexed_pixels (guchar *src,
- guchar *dest,
- const guchar *mask,
- const guchar *cmap,
- const guchar *bg,
- gboolean cut,
- guint length,
- guint src_bytes,
- guint dest_bytes)
-{
- const guchar *m = mask ? mask : &no_mask;
- gint b;
- gint t;
-
- while (length --)
- {
- gint index = src[0] * 3;
-
- for (b = 0; b < 3; b++)
- dest[b] = cmap[index + b];
-
- if (HAS_ALPHA (src_bytes))
- {
- dest[3] = INT_MULT (*m, src[1], t);
- if (cut)
- src[1] = INT_MULT ((255 - *m), src[1], t);
- }
- else
- {
- if (HAS_ALPHA (dest_bytes))
- dest[3] = *m;
-
- if (cut)
- src[0] = (*m > 127) ? bg[0] : src[0];
- }
-
- if (mask)
- m++;
-
- src += src_bytes;
- dest += dest_bytes;
- }
-}
-
-
/**************************************************/
/* REGION FUNCTIONS */
/**************************************************/
@@ -1863,51 +1772,6 @@ add_alpha_region (PixelRegion *src,
void
-extract_from_region (PixelRegion *src,
- PixelRegion *dest,
- PixelRegion *mask,
- const guchar *cmap,
- const guchar *bg,
- GimpImageBaseType type,
- gboolean cut)
-{
- gpointer pr;
-
- for (pr = pixel_regions_register (3, src, dest, mask);
- pr != NULL;
- pr = pixel_regions_process (pr))
- {
- const guchar *m = mask ? mask->data : NULL;
- guchar *s = src->data;
- guchar *d = dest->data;
- gint h = src->h;
-
- while (h --)
- {
- switch (type)
- {
- case GIMP_RGB:
- case GIMP_GRAY:
- extract_from_inten_pixels (s, d, m, bg, cut, src->w,
- src->bytes, dest->bytes);
- break;
-
- case GIMP_INDEXED:
- extract_from_indexed_pixels (s, d, m, cmap, bg, cut, src->w,
- src->bytes, dest->bytes);
- break;
- }
-
- s += src->rowstride;
- d += dest->rowstride;
- if (mask)
- m += mask->rowstride;
- }
- }
-}
-
-
-void
convolve_region (PixelRegion *srcR,
PixelRegion *destR,
const gfloat *matrix,
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index 4d3d573..ceb6726 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -273,32 +273,6 @@ void paint_funcs_color_erase_helper (GimpRGB *src,
const GimpRGB *color);
-/* extract information from intensity pixels based on
- * a mask.
- */
-void extract_from_inten_pixels (guchar *src,
- guchar *dest,
- const guchar *mask,
- const guchar *bg,
- gboolean cut,
- guint length,
- guint src_bytes,
- guint dest_bytes);
-
-/* extract information from indexed pixels based on
- * a mask.
- */
-void extract_from_indexed_pixels (guchar *src,
- guchar *dest,
- const guchar *mask,
- const guchar *cmap,
- const guchar *bg,
- gboolean cut,
- guint length,
- guint src_bytes,
- guint dest_bytes);
-
-
/* Region functions */
void color_region (PixelRegion *dest,
@@ -319,14 +293,6 @@ void extract_alpha_region (PixelRegion *src,
PixelRegion *mask,
PixelRegion *dest);
-void extract_from_region (PixelRegion *src,
- PixelRegion *dest,
- PixelRegion *mask,
- const guchar *cmap,
- const guchar *bg,
- GimpImageBaseType type,
- gboolean cut);
-
void convolve_region (PixelRegion *srcR,
PixelRegion *destR,
const gfloat *matrix,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]