[cairo] Disabling AA for PDF -> Image copy
Ian Britten
britten at caris.com
Wed Sep 22 10:01:21 PDT 2010
Hi all,
I've got a PDF surface containing pre-rendered data that I'm
trying to rasterize (copy) to an image surface. Because the
data represents 8-bit colour palette data, I need to rasterize
it with AA off, to prevent introducing new colours.
Unfortunately, it doesn't seem to be working as I'd expect.
Attached is a test program (With comments) showing the problem,
namely that the output is AA'd, when it shouldn't be (IMHO).
What's really weird/surprising is that I've found a workaround,
but it doesn't really make sense (to me). If I disable AA on
the *source* PDF, _before_ drawing anything, then I can get
non-AA output.
To me, setting AA on/off on a PDF surface is nonsensical, and
shouldn't have any effect. But it apparently does.
Additionally, the workaround doesn't really fit in my workflow,
since it requires being set before any data is drawn...
Does anyone have any insight/info about what I'm seeing, or maybe
have an alternate strategy? To me, it seems like a bug...
Many thanks for any info!
Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple_copy.c
Type: text/x-csrc
Size: 2309 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100922/fe05aa75/attachment.c>
More information about the cairo
mailing list