From 1d9a98f81e0cb90fcce893f11cc6dcb66323b242 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 14 Mar 2012 17:38:53 +0100 Subject: Combine Opacity attribute with alpha from #RGBA specified colors. --- xps/xps_glyphs.c | 2 +- xps/xps_path.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xps') diff --git a/xps/xps_glyphs.c b/xps/xps_glyphs.c index 8a1b7fb8..f75815f0 100644 --- a/xps/xps_glyphs.c +++ b/xps/xps_glyphs.c @@ -589,7 +589,7 @@ xps_parse_glyphs(xps_document *doc, fz_matrix ctm, xps_parse_color(doc, base_uri, fill_att, &colorspace, samples); if (fill_opacity_att) - samples[0] = fz_atof(fill_opacity_att); + samples[0] *= fz_atof(fill_opacity_att); xps_set_color(doc, colorspace, samples); fz_fill_text(doc->dev, text, ctm, diff --git a/xps/xps_path.c b/xps/xps_path.c index baf71bc4..e368776d 100644 --- a/xps/xps_path.c +++ b/xps/xps_path.c @@ -1016,7 +1016,7 @@ xps_parse_path(xps_document *doc, fz_matrix ctm, char *base_uri, xps_resource *d { xps_parse_color(doc, base_uri, fill_att, &colorspace, samples); if (fill_opacity_att) - samples[0] = fz_atof(fill_opacity_att); + samples[0] *= fz_atof(fill_opacity_att); xps_set_color(doc, colorspace, samples); fz_fill_path(doc->dev, path, fill_rule == 0, ctm, @@ -1034,7 +1034,7 @@ xps_parse_path(xps_document *doc, fz_matrix ctm, char *base_uri, xps_resource *d { xps_parse_color(doc, base_uri, stroke_att, &colorspace, samples); if (stroke_opacity_att) - samples[0] = fz_atof(stroke_opacity_att); + samples[0] *= fz_atof(stroke_opacity_att); xps_set_color(doc, colorspace, samples); fz_stroke_path(doc->dev, stroke_path, &stroke, ctm, -- cgit v1.2.3