[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19352] Cairo: bad EPS from NSView_dataWithEPSInsideRect:

From: Mark Tracy
Subject: [bug #19352] Cairo: bad EPS from NSView_dataWithEPSInsideRect:
Date: Wed, 24 Oct 2007 06:57:09 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061023 SUSE/ Firefox/

Follow-up Comment #13, bug #19352 (project gnustep):

First, I should apologize for my confused previous post. I should not try to
write intelligently after dental surgery. 

The list of clipping rectangles is a feature of the pixman library that cairo
uses for operations in device-space of pixelated surfaces, in particular the
Xlib and image surfaces. Since PS and PDF are vector surfaces, they don't use
pixman, and hence can't produce the list of clipping rectangles. Therefore I
had to do something drastic. (Why the authors of cairo made the list of
rectangles part of the public API is very mysterious, since it only works for
some surfaces. The docs don't make this clear; I had to read code to figure
this out.)

The attached patch does four things:
1) It implements a different copyWithZone: that relies on cairo_save() to
copy the cairo context info.
2) It overrides DPSgrestore to add a cairo_restore()
3) It suppresses the _adjustpath operation.
4) It fixes an unrelated compiler warning.

So far, it has tested well for me, but it needs more scrutiny. The first
benefit is that printing no longer chokes my shared printer. The second is
that my chromatograms are much prettier because they now display and print at
high resolution. Look at the new version of cairo-0013.ps. The third benefit
is much shorter code.

I still have the problems with print scaling and margins, so it didn't fix
that. The positioning is definitely related to print margins, but at this
point it is not clear whether that is GNUstep or me that has the problem.

(file #14188, file #14189)

Additional Item Attachment:

File name: MT_23-Oct-07.patch             Size:6 KB
File name: cairo-0013.ps                  Size:227 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]