[gimp/goat-invasion] app: remove apply_mask_to_region() and its helper functions
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion] app: remove apply_mask_to_region() and its helper functions
- Date: Mon, 23 Apr 2012 17:27:45 +0000 (UTC)
commit 1895061a74279a63ab7eb3daa975df27c7bc0588
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 23 19:27:05 2012 +0200
app: remove apply_mask_to_region() and its helper functions
app/paint-funcs/paint-funcs-generic.h | 34 ---------------------------------
app/paint-funcs/paint-funcs.c | 31 ------------------------------
app/paint-funcs/paint-funcs.h | 12 -----------
3 files changed, 0 insertions(+), 77 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index cc25833..287ff6c 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -109,40 +109,6 @@ replace_pixels (const guchar *src1,
inline void
-apply_mask_to_alpha_channel (guchar *src,
- const guchar *mask,
- guint opacity,
- guint length,
- guint bytes)
-{
- src += bytes - 1;
-
- if (opacity == 255)
- {
- while (length --)
- {
- glong tmp;
-
- *src = INT_MULT(*src, *mask, tmp);
- mask++;
- src += bytes;
- }
- }
- else
- {
- while (length --)
- {
- glong tmp;
-
- *src = INT_MULT3(*src, *mask, opacity, tmp);
- mask++;
- src += bytes;
- }
- }
-}
-
-
-inline void
copy_gray_to_inten_a_pixels (const guchar *src,
guchar *dest,
guint length,
diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c
index b5bdd90..7395b44 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -1982,37 +1982,6 @@ dilate_region (PixelRegion *region)
g_free (out);
}
-/* Computes whether pixels in `buf[1]' have neighbouring pixels that are
- unselected. Put result in `transition'. */
-static void
-apply_mask_to_sub_region (gint *opacityp,
- PixelRegion *src,
- PixelRegion *mask)
-{
- guchar *s = src->data;
- const guchar *m = mask->data;
- gint h = src->h;
- guint opacity = *opacityp;
-
- while (h--)
- {
- apply_mask_to_alpha_channel (s, m, opacity, src->w, src->bytes);
- s += src->rowstride;
- m += mask->rowstride;
- }
-}
-
-void
-apply_mask_to_region (PixelRegion *src,
- PixelRegion *mask,
- guint opacity)
-{
- pixel_regions_process_parallel ((PixelProcessorFunc)
- apply_mask_to_sub_region,
- &opacity, 2, src, mask);
-}
-
-
void
copy_gray_to_region (PixelRegion *src,
PixelRegion *dest)
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index 61fbabc..10f5f68 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -19,13 +19,6 @@
#define __PAINT_FUNCS_H__
-/* apply the mask data to the alpha channel of the pixel data */
-void apply_mask_to_alpha_channel (guchar *src,
- const guchar *mask,
- guint opacity,
- guint length,
- guint bytes);
-
/* copy gray pixels to intensity-alpha pixels. This function
* essentially takes a source that is only a grayscale image and
* copies it to the destination, expanding to RGB if necessary and
@@ -234,11 +227,6 @@ void erode_region (PixelRegion *region);
void dilate_region (PixelRegion *region);
-/* Apply a mask to an image's alpha channel */
-void apply_mask_to_region (PixelRegion *src,
- PixelRegion *mask,
- guint opacity);
-
/* Copy a gray image to an intensity-alpha region */
void copy_gray_to_region (PixelRegion *src,
PixelRegion *dest);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]