[gimp/goat-invasion] app: remove combine_mask_and_region() and its helper functions



commit 48295d8ac2d21a89270051370ee472e79e199945
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 23 12:55:23 2012 +0200

    app: remove combine_mask_and_region() and its helper functions

 app/paint-funcs/paint-funcs-generic.h |   71 ---------------------------------
 app/paint-funcs/paint-funcs.c         |   56 --------------------------
 app/paint-funcs/paint-funcs.h         |   19 ---------
 3 files changed, 0 insertions(+), 146 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index 0735cf9..cc25833 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -143,77 +143,6 @@ apply_mask_to_alpha_channel (guchar       *src,
 
 
 inline void
-combine_mask_and_alpha_channel_stipple (guchar       *src,
-                                        const guchar *mask,
-                                        guint         opacity,
-                                        guint         length,
-                                        guint         bytes)
-{
-  /* align with alpha channel */
-  src += bytes - 1;
-
-  if (opacity != 255)
-    while (length --)
-      {
-        gint tmp;
-        gint mask_val = INT_MULT(*mask, opacity, tmp);
-
-        *src = *src + INT_MULT((255 - *src) , mask_val, tmp);
-
-        src += bytes;
-        mask++;
-      }
-  else
-    while (length --)
-      {
-        gint tmp;
-
-        *src = *src + INT_MULT((255 - *src) , *mask, tmp);
-
-        src += bytes;
-        mask++;
-      }
-}
-
-
-inline void
-combine_mask_and_alpha_channel_stroke (guchar       *src,
-                                       const guchar *mask,
-                                       guint         opacity,
-                                       guint         length,
-                                       guint         bytes)
-{
-  /* align with alpha channel */
-  src += bytes - 1;
-
-  if (opacity != 255)
-    while (length --)
-      {
-        if (opacity > *src)
-          {
-            gint tmp;
-            gint mask_val = INT_MULT (*mask, opacity, tmp);
-
-            *src = *src + INT_MULT ((opacity - *src) , mask_val, tmp);
-          }
-
-        src += bytes;
-        mask++;
-      }
-  else
-    while (length --)
-      {
-        gint tmp;
-
-        *src = *src + INT_MULT ((255 - *src) , *mask, tmp);
-
-        src += bytes;
-        mask++;
-      }
-}
-
-
-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 2dab6c4..b5bdd90 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -2013,62 +2013,6 @@ apply_mask_to_region (PixelRegion *src,
 }
 
 
-static void
-combine_mask_and_sub_region_stipple (gint        *opacityp,
-                                     PixelRegion *src,
-                                     PixelRegion *mask)
-{
-  guchar       *s       = src->data;
-  const guchar *m       = mask->data;
-  gint          h       = src->h;
-  guint         opacity = *opacityp;
-
-  while (h--)
-    {
-      combine_mask_and_alpha_channel_stipple (s, m, opacity,
-                                              src->w, src->bytes);
-      s += src->rowstride;
-      m += mask->rowstride;
-    }
-}
-
-
-static void
-combine_mask_and_sub_region_stroke (gint        *opacityp,
-                                    PixelRegion *src,
-                                    PixelRegion *mask)
-{
-  guchar       *s       = src->data;
-  const guchar *m       = mask->data;
-  gint          h       = src->h;
-  guint         opacity = *opacityp;
-
-  while (h--)
-    {
-      combine_mask_and_alpha_channel_stroke (s, m, opacity, src->w, src->bytes);
-      s += src->rowstride;
-      m += mask->rowstride;
-    }
-}
-
-
-void
-combine_mask_and_region (PixelRegion *src,
-                         PixelRegion *mask,
-                         guint        opacity,
-                         gboolean     stipple)
-{
-  if (stipple)
-    pixel_regions_process_parallel ((PixelProcessorFunc)
-                                    combine_mask_and_sub_region_stipple,
-                                    &opacity, 2, src, mask);
-  else
-    pixel_regions_process_parallel ((PixelProcessorFunc)
-                                    combine_mask_and_sub_region_stroke,
-                                    &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 7ff2bf5..61fbabc 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -26,19 +26,6 @@ void  apply_mask_to_alpha_channel         (guchar       *src,
                                            guint         length,
                                            guint         bytes);
 
-/*  combine the mask data with the alpha channel of the pixel data  */
-void  combine_mask_and_alpha_channel_stipple (guchar       *src,
-                                              const guchar *mask,
-                                              guint         opacity,
-                                              guint         length,
-                                              guint         bytes);
-
-void  combine_mask_and_alpha_channel_stroke  (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
@@ -252,12 +239,6 @@ void  apply_mask_to_region                (PixelRegion *src,
                                            PixelRegion *mask,
                                            guint        opacity);
 
-/*  Combine a mask with an image's alpha channel  */
-void  combine_mask_and_region             (PixelRegion *src,
-                                           PixelRegion *mask,
-                                           guint        opacity,
-                                           gboolean     stipple);
-
 /*  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]