[gimp/goat-invasion: 144/401] app: remove pattern_region()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 144/401] app: remove pattern_region()
- Date: Mon, 2 Apr 2012 12:00:13 +0000 (UTC)
commit 33488b62b7c864a49565e6358c8918ab0aa00884
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 19 02:36:58 2012 +0100
app: remove pattern_region()
app/paint-funcs/paint-funcs-generic.h | 56 ---------------------------------
app/paint-funcs/paint-funcs.c | 31 ------------------
app/paint-funcs/paint-funcs.h | 14 --------
3 files changed, 0 insertions(+), 101 deletions(-)
---
diff --git a/app/paint-funcs/paint-funcs-generic.h b/app/paint-funcs/paint-funcs-generic.h
index bc59b02..8685a26 100644
--- a/app/paint-funcs/paint-funcs-generic.h
+++ b/app/paint-funcs/paint-funcs-generic.h
@@ -173,62 +173,6 @@ color_pixels_mask (guchar *dest,
}
}
-void
-pattern_pixels_mask (guchar *dest,
- const guchar *mask,
- TempBuf *pattern,
- guint w,
- guint bytes,
- gint x,
- gint y)
-{
- const guint alpha = HAS_ALPHA (bytes) ? bytes - 1 : bytes;
- const guchar *pat;
- guint i;
-
- /* Get a pointer to the appropriate scanline of the pattern buffer */
- pat = (temp_buf_get_data (pattern) +
- (y % pattern->height) * pattern->width * pattern->bytes);
-
-
- /*
- * image data = pattern data for all but alpha
- *
- * If (image has alpha)
- * if (there's a mask)
- * image data = mask for alpha;
- * else
- * image data = opaque for alpha.
- *
- * if (pattern has alpha)
- * multiply existing alpha channel by pattern alpha
- * (normalised to (0..1))
- */
-
- for (i = 0; i < w; i++)
- {
- const guchar *p = pat + ((i + x) % pattern->width) * pattern->bytes;
- guint b;
-
- for (b = 0; b < alpha; b++)
- dest[b] = p[b];
-
- if (HAS_ALPHA (bytes))
- {
- if (mask)
- dest[alpha] = *mask++;
- else
- dest[alpha] = OPAQUE_OPACITY;
-
- if (HAS_ALPHA (pattern->bytes))
- dest[alpha] = (guchar) (dest[alpha] *
- p[alpha] / (gdouble) OPAQUE_OPACITY);
- }
-
- dest += bytes;
- }
-}
-
/*
* blend_pixels patched 8-24-05 to fix bug #163721. Note that this change
* causes the function to treat src1 and src2 asymmetrically. This gives the
diff --git a/app/paint-funcs/paint-funcs.c b/app/paint-funcs/paint-funcs.c
index f9ae635..1bbcb99 100644
--- a/app/paint-funcs/paint-funcs.c
+++ b/app/paint-funcs/paint-funcs.c
@@ -1805,37 +1805,6 @@ color_region_mask (PixelRegion *dest,
}
void
-pattern_region (PixelRegion *dest,
- PixelRegion *mask,
- TempBuf *pattern,
- gint off_x,
- gint off_y)
-{
- gpointer pr;
-
- for (pr = pixel_regions_register (2, dest, mask);
- pr != NULL;
- pr = pixel_regions_process (pr))
- {
- guchar *d = dest->data;
- const guchar *m = mask ? mask->data : NULL;
- gint y;
-
- for (y = 0; y < dest->h; y++)
- {
- pattern_pixels_mask (d, m, pattern, dest->w, dest->bytes,
- off_x + dest->x,
- off_y + dest->y + y);
-
- d += dest->rowstride;
-
- if (mask)
- m += mask->rowstride;
- }
- }
-}
-
-void
blend_region (PixelRegion *src1,
PixelRegion *src2,
PixelRegion *dest,
diff --git a/app/paint-funcs/paint-funcs.h b/app/paint-funcs/paint-funcs.h
index a182f38..4158987 100644
--- a/app/paint-funcs/paint-funcs.h
+++ b/app/paint-funcs/paint-funcs.h
@@ -32,14 +32,6 @@ void color_pixels_mask (guchar *dest,
guint w,
guint bytes);
-void pattern_pixels_mask (guchar *dest,
- const guchar *mask,
- TempBuf *pattern,
- guint w,
- guint bytes,
- gint x,
- gint y);
-
void blend_pixels (const guchar *src1,
const guchar *src2,
guchar *dest,
@@ -327,12 +319,6 @@ void color_region_mask (PixelRegion *dest,
PixelRegion *mask,
const guchar *color);
-void pattern_region (PixelRegion *dest,
- PixelRegion *mask,
- TempBuf *pattern,
- gint off_x,
- gint off_y);
-
void blend_region (PixelRegion *src1,
PixelRegion *src2,
PixelRegion *dest,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]