[gs-bugs] [Bug 691437] Empty ResourceDictionary not handled.

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu Jul 1 07:48:52 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691437

--- Comment #2 from norbert.janssen at oce.com 2010-07-01 07:48:51 UTC ---
(In reply to comment #1)
> Also in this testjob out of bound GradientStops are used (-1.0, 2.0 etc). They
> should be clipped against 0.0 and 1.0 resp.
> The boxes on the left of the page should look the same as on the right of the
> page.
> 
> gxps -sDEVICE=jpeg -sOutputFile=page%d.jpg GradientStop.xps
> 
> fix in xpsgradient.xps
>         if (!strcmp(xps_tag(node), "GradientStop"))
>         {
>             char *offset = xps_att(node, "Offset");
>             char *color = xps_att(node, "Color");
>             if (offset && color)
>             {
>                 offsets[count] = atof(offset);
> 
>                 /* clip stop-value against valid range */
>         if (offsets[count] < 0.0)
>             offsets[count] = 0.0;
>         if (offsets[count] > 1.0)
>             offsets[count] = 1.0;
> 
> 
>                 xps_parse_color(ctx, base_uri, color, &colorspace, sample);

Clipping is wrong (left boxes look different from right boxes).
An interpolated value should have been used (see ch. 11.3.1.1 Gradient Stop
Pre-Processing in the xps spec 1.0, page 239

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list