Re: Help with PDF output from painting surfaces
Andrea Canciani <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAN_5=BAJXQvLeAZg3qd_1aMBRDnc-1eUMaaWHSOvQU7=5qHQSw@mail.gmail.com> |
On Mon, Nov 14, 2011 at 5:01 PM, Cope, Phil (GE Energy) <[email protected]> wrote: > Hello, I have a problem with PDF output. I have a system that can > potentially render a huge image (e.g. a satellite photography) It does this > by tiling the image and sending the tiles to Cairo which are then painted as > source. > > > > When outputting to PDF there is an issue illustrated by the screengrabs of > Adobe Reader displaying the Cairo output (see links below). The first is > fine, but the second, which is the same data (approximately) rotated > through 45deg. The third is a zoomed in area of the previous. The obvious > problem is what looks like antialiasing on the edge of the tiles which is > manifesting itself as diagonal lines on the boundaries of the tiles. More than antialiasing, I would guess that your problem is CAIRO_EXTEND_NONE. Can you check if setting the extend mode to PAD solves your problem? (You will need to fill a rectangle, if you use a PAD-extended source). Andrea > > > > I set > > > > cairo_set_antialias(ctxt, CAIRO_ANTIALIAS_NONE); > > > > while drawing these tiles, I also tried > > > > cairo_set_operator(ctxt, CAIRO_OPERATOR_SOURCE); > > > > (rather than _OVER) but this had bizarre and unwanted effects on the screen > drawing. > > > > Any hints as to how I can remove these artefacts would be much appreciated, > I’m using 1.10.2 > > > > Unrotated: > > http://s10.postimage.org/p0jf9u0cp/cairo_0deg.png > > > > Rotated at 45 deg: > > http://s7.postimage.org/4zwv1z697/cairo_45deg.png > > > > Above PDF zoomed in: > > http://s9.postimage.org/ra6wl28fj/cairo_45deg_zoomed.png > > > > > > Cheers > > > > Phil Cope > > Senior Software Engineer (GE Energy: SSG) > > > > -- > cairo mailing list > [email protected] > http://lists.cairographics.org/mailman/listinfo/cairo > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo