summaryrefslogtreecommitdiff
path: root/draw/draw_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw/draw_device.c')
-rw-r--r--draw/draw_device.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c
index 0c95cbca..addd798c 100644
--- a/draw/draw_device.c
+++ b/draw/draw_device.c
@@ -253,7 +253,7 @@ fz_draw_fill_path(fz_device *devp, fz_path *path, int even_odd, const fz_matrix
fz_colorspace *model = state->dest->colorspace;
if (model == NULL)
- model = fz_device_gray;
+ model = fz_device_gray(dev->ctx);
fz_reset_gel(dev->gel, &state->scissor);
fz_flatten_fill_path(dev->gel, path, ctm, flatness);
@@ -303,7 +303,7 @@ fz_draw_stroke_path(fz_device *devp, fz_path *path, fz_stroke_state *stroke, con
fz_colorspace *model = state->dest->colorspace;
if (model == NULL)
- model = fz_device_gray;
+ model = fz_device_gray(dev->ctx);
if (linewidth * expansion < 0.1f)
linewidth = 1 / expansion;
@@ -766,7 +766,7 @@ fz_draw_clip_text(fz_device *devp, fz_text *text, const fz_matrix *ctm, int accu
state[0].mask = NULL;
fz_try(ctx)
{
- fz_draw_fill_path(devp, path, 0, &fz_identity, fz_device_gray, &white, 1);
+ fz_draw_fill_path(devp, path, 0, &fz_identity, fz_device_gray(ctx), &white, 1);
}
fz_always(ctx)
{
@@ -881,7 +881,7 @@ fz_draw_clip_stroke_text(fz_device *devp, fz_text *text, fz_stroke_state *stroke
state[0].mask = NULL;
fz_try(ctx)
{
- fz_draw_stroke_path(devp, path, stroke, &fz_identity, fz_device_gray, &white, 1);
+ fz_draw_stroke_path(devp, path, stroke, &fz_identity, fz_device_gray(ctx), &white, 1);
}
fz_always(ctx)
{
@@ -1107,7 +1107,7 @@ fz_draw_fill_image(fz_device *devp, fz_image *image, const fz_matrix *ctm, float
state = fz_knockout_begin(dev);
after = 0;
- if (pixmap->colorspace == fz_device_gray)
+ if (pixmap->colorspace == fz_device_gray(ctx))
after = 1;
if (pixmap->colorspace != model && !after)
@@ -1137,8 +1137,8 @@ fz_draw_fill_image(fz_device *devp, fz_image *image, const fz_matrix *ctm, float
if (pixmap->colorspace != model)
{
- if ((pixmap->colorspace == fz_device_gray && model == fz_device_rgb) ||
- (pixmap->colorspace == fz_device_gray && model == fz_device_bgr))
+ if ((pixmap->colorspace == fz_device_gray(ctx) && model == fz_device_rgb(ctx)) ||
+ (pixmap->colorspace == fz_device_gray(ctx) && model == fz_device_bgr(ctx)))
{
/* We have special case rendering code for gray -> rgb/bgr */
}
@@ -1409,7 +1409,7 @@ fz_draw_begin_mask(fz_device *devp, const fz_rect *rect, int luminosity, fz_colo
fz_try(ctx)
{
- state[1].dest = dest = fz_new_pixmap_with_bbox(dev->ctx, fz_device_gray, &bbox);
+ state[1].dest = dest = fz_new_pixmap_with_bbox(dev->ctx, fz_device_gray(ctx), &bbox);
if (state->shape)
{
/* FIXME: If we ever want to support AIS true, then
@@ -1425,8 +1425,8 @@ fz_draw_begin_mask(fz_device *devp, const fz_rect *rect, int luminosity, fz_colo
{
float bc;
if (!colorspace)
- colorspace = fz_device_gray;
- fz_convert_color(dev->ctx, fz_device_gray, &bc, colorspace, colorfv);
+ colorspace = fz_device_gray(ctx);
+ fz_convert_color(dev->ctx, fz_device_gray(ctx), &bc, colorspace, colorfv);
fz_clear_pixmap_with_value(dev->ctx, dest, bc * 255);
if (shape)
fz_clear_pixmap_with_value(dev->ctx, shape, 255);