summaryrefslogtreecommitdiff
path: root/source/fitz/draw-edgebuffer.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-07-25 17:15:25 +0100
committerRobin Watts <robin.watts@artifex.com>2017-10-24 15:16:35 +0100
commit72c202c98ec708d48d54c21935430a2c733675e7 (patch)
tree78cba475b3bb79fe3c284dc771e4b970ba42f87f /source/fitz/draw-edgebuffer.c
parent89b91112b810a6b29396b8f4e91c8bde92969e0e (diff)
downloadmupdf-72c202c98ec708d48d54c21935430a2c733675e7.tar.xz
Overprint support.
Introduce an fz_overprint bitmap (currently just a uint32_t, but it'll grow to be an array of them if FZ_MAX_COLOR is increased). Pointers to this are passed into all our painting routines. NULL means "Do what you've always done before, with no overprint". non NULL, means that every set bit means "don't ever alter this component". We therefore set the overprint bitmap up according to the input color/colorspace/colorparams before calling each routine.
Diffstat (limited to 'source/fitz/draw-edgebuffer.c')
-rw-r--r--source/fitz/draw-edgebuffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fitz/draw-edgebuffer.c b/source/fitz/draw-edgebuffer.c
index 60c28a6d..db2bbe3a 100644
--- a/source/fitz/draw-edgebuffer.c
+++ b/source/fitz/draw-edgebuffer.c
@@ -1471,7 +1471,7 @@ static int intcmp(const void *a, const void *b)
return *((int*)a) - *((int *)b);
}
-static void fz_convert_edgebuffer(fz_context *ctx, fz_rasterizer *ras, int eofill, const fz_irect *clip, fz_pixmap *pix, unsigned char *color)
+static void fz_convert_edgebuffer(fz_context *ctx, fz_rasterizer *ras, int eofill, const fz_irect *clip, fz_pixmap *pix, unsigned char *color, fz_overprint *eop)
{
fz_edgebuffer *eb = (fz_edgebuffer *)ras;
int scanlines = ras->clip.y1 - ras->clip.y0;
@@ -1481,7 +1481,7 @@ static void fz_convert_edgebuffer(fz_context *ctx, fz_rasterizer *ras, int eofil
uint8_t *out;
fz_solid_color_painter_t *fn;
- fn = fz_get_solid_color_painter(pix->n, color, pix->alpha);
+ fn = fz_get_solid_color_painter(pix->n, color, pix->alpha, eop);
assert(fn);
if (fn == NULL)
return;
@@ -1609,7 +1609,7 @@ static void fz_convert_edgebuffer(fz_context *ctx, fz_rasterizer *ras, int eofil
left = 0;
right -= left;
if (right > 0) {
- (*fn)(out + left*n, n, right, color, a);
+ (*fn)(out + left*n, n, right, color, a, eop);
}
}
out += pix->stride;
@@ -1626,7 +1626,7 @@ static int edgecmp(const void *a, const void *b)
return ((int*)a)[1] - ((int*)b)[1];
}
-static void fz_convert_edgebuffer_app(fz_context *ctx, fz_rasterizer *ras, int eofill, const fz_irect *clip, fz_pixmap *pix, unsigned char *color)
+static void fz_convert_edgebuffer_app(fz_context *ctx, fz_rasterizer *ras, int eofill, const fz_irect *clip, fz_pixmap *pix, unsigned char *color, fz_overprint *eop)
{
fz_edgebuffer *eb = (fz_edgebuffer *)ras;
int scanlines = ras->clip.y1 - ras->clip.y0;
@@ -1636,7 +1636,7 @@ static void fz_convert_edgebuffer_app(fz_context *ctx, fz_rasterizer *ras, int e
uint8_t *out;
fz_solid_color_painter_t *fn;
- fn = fz_get_solid_color_painter(pix->n, color, pix->alpha);
+ fn = fz_get_solid_color_painter(pix->n, color, pix->alpha, eop);
assert(fn);
if (fn == NULL)
return;
@@ -1801,7 +1801,7 @@ static void fz_convert_edgebuffer_app(fz_context *ctx, fz_rasterizer *ras, int e
left = 0;
right -= left;
if (right > 0) {
- (*fn)(out + left*n, n, right, color, a);
+ (*fn)(out + left*n, n, right, color, a, eop);
}
}
out += pix->stride;