summaryrefslogtreecommitdiff
path: root/xps/xpscolor.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-01 03:50:43 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-01 03:50:43 +0200
commit5a18d4874159ba759863a3dc29ef11fcd23924f9 (patch)
tree1783453f00a246e3d101f0148480a96ceee7016e /xps/xpscolor.c
parent7c6ae0b110d0a29558305878482023ad7e8a66dc (diff)
downloadmupdf-5a18d4874159ba759863a3dc29ef11fcd23924f9.tar.xz
xps: Use opacity masks, and draw gradients with opacity.
Diffstat (limited to 'xps/xpscolor.c')
-rw-r--r--xps/xpscolor.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/xps/xpscolor.c b/xps/xpscolor.c
index b0678603..1858c687 100644
--- a/xps/xpscolor.c
+++ b/xps/xpscolor.c
@@ -7,20 +7,10 @@ void
xps_set_color(xps_context *ctx, fz_colorspace *colorspace, float *samples)
{
int i;
-
- if (ctx->opacity_only)
- {
- ctx->colorspace = fz_devicegray;
- ctx->color[0] = samples[0];
- ctx->alpha = 1.0;
- }
- else
- {
- ctx->colorspace = colorspace;
- for (i = 0; i < colorspace->n; i++)
- ctx->color[i] = samples[i + 1];
- ctx->alpha = samples[0];
- }
+ ctx->colorspace = colorspace;
+ for (i = 0; i < colorspace->n; i++)
+ ctx->color[i] = samples[i + 1];
+ ctx->alpha = samples[0];
}
static int unhex(int chr)