diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2023-05-15 16:33:56 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2023-05-16 17:23:43 +0100 |
commit | fb7a6565ec3a66def0edbbf6c93f73df96dd4d4a (patch) | |
tree | 656d1ffb23998f1e9c7b0be6d6526fd7ae8c2030 /base/gsdparam.c | |
parent | f3e65aac8855b59e06c6e8be0412626e56f05106 (diff) | |
download | ghostpdl-fb7a6565ec3a66def0edbbf6c93f73df96dd4d4a.tar.gz |
Bug 706686: Fix alphabits, fill/stroke, and transparency interaction.
When doing a fill stroke in the presence of transparency, we use
a knockout group to get the correct results.
When we use alphabits, this results in the actual plotting
happening via copy_alpha_color.
The pdf14 copy_alpha_color routines don't ever appear to be called
in normal runs, and they don't seem to take note of the backdrop
for knockout runs.
Accordingly, we update them here so they do.
Also, to avoid nasty lines around the edge of stroke segments
we ensure that do_fill_stroke keeps the lop_pdf14 bit set
until AFTER the stroke is complete.
While this gives VASTLY improved rendering in most cases, this does
leave us with the classic 'white halos' around knocked out shapes.
What typically happens during a fill/stroke is that we push a
knockout group, and draw the fill into it. Then we draw the stroke
into it. As the stroke is drawn, all we have for each pixel is a
color and an alpha.
The old code used to use the alpha to mix between the given color,
and the current group contents. This is wrong, because it stops
knockout happening.
The new code uses the alpha to mix between the given color, and the
original background. This correctly knocks out colors, but leaves
nasty white halos around the edge of things.
I think the issue here is that we are getting a single alpha, when
really we'd like both opacity and shape. To do this properly, I
think we should combine the color and the original background by
opacity, and then combine the result of that with the current group
contents by shape. But we only have the combined opacity and shape
value. So we're probably doing as well as we can hope to for now.
Diffstat (limited to 'base/gsdparam.c')
0 files changed, 0 insertions, 0 deletions