Commit 5cf45ff3 authored by Michael Natterer's avatar Michael Natterer 😴

app: remove apply_mask_to_region() and its helper functions

parent 3090b076
......@@ -108,40 +108,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,
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
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