[cairo-bugs] [Bug 30282] Blurry results when scaling+copying a vector surface to an image surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 21 10:13:17 PDT 2010


--- Comment #2 from Ian Britten <britten at caris.com> 2010-09-21 10:13:14 PDT ---
Created an attachment (id=38846)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=38846)
Sample program showing workaround

Attached is a (more extensive) sample, containing a work-around that seems to
be working.

As suggested by ranma42 (IRC), performing the scaling onto a second vector/PDF
surface, and then copying the PDF to the Image for rasterization (with a 1-1
scaling) almost works.  The final key is to set the filtering to
CAIRO_FILTER_NEAREST, when scaling the source PDF to the temporary PDF.

Admittedly, setting the filtering seems like it should be unnecessary, since it
should be copying vector to vector (ie: lossless).  However, that is probably
the crux of the Cairo problem.  Hopefully in the future version of Cairo, a
1-step copy will 'just work', and this 2-step workaround won't be needed.

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

More information about the cairo-bugs mailing list