I'm attaching a code that produces output if linked to cairo.1.4.12 and nothing if ran under 1.5.2. In the example it produces a postscript, but the problem happens with pdf or png as well. Not sure what "triggers" cairo to go to "bitmap" mode under the postscript, but it takes much longer and comes back empty! Sorry I tried to make the code as small as possible but it does not "triggers" on the simple easy test case i made so far. I keep trying though. I'm using Linux 2.6, but i'm sure i can reproduce it under Mac OS X (10.4)
Created attachment 12796 [details] code showing the bug 1.4 vs 1.5 linknig against 1.4 createsa valid postscript, linkning vs 1.5 creates an empty ps
Created attachment 12797 [details] sample of bad/empty ps file
Created attachment 12798 [details] sample of good/working ps file (linked against 1.4.12)
I would recommend checking the error status using cairo_status() after the call to cairo_surface_finish(). Often when a bad or empty PostScript file is created cairo_status() will return an error code. Running gdb on the test case I can see that in the analysis surface _cairo_traps_extents() is returning large numbers (x = 32767, y = 32767, width = 1, height = 1). There does not appear to be anything in your code that would make the coordinates go out of range.
I noticed that in order to get my postscript output correct, i need to define the page as 600x600, then rotate and translate... if i declare the page as 600x790 for example then nothing is ever drawn. I'm thinking that mught be the problem with 1.5.2 that triggers "bitmap" mode for some reason and sees the bitmap as "out" of the page therefore not drawing it? If that's so, any idea on how to fix the code to get the postscript in landscape mode? Thx, C.
Chris Wilson fixed the bug with this commit http://gitweb.freedesktop.org/?p=cairo;a=commit;h=481fd3b4c8d3972ce21399f81b2021a57ed58f00 The test case now works for me.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.