Summary: | postscript cuts text when rotated | ||
---|---|---|---|
Product: | cairo | Reporter: | Charles Doutriaux <doutriaux1> |
Component: | postscript backend | Assignee: | Adrian Johnson <ajohnson> |
Status: | RESOLVED NOTABUG | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.8.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Result that works ok, legend is full and theres about 20 "X"
bad file, only a few "X" legend label are also cropped the FULL C code, not just the snippet |
Description
Charles Doutriaux
2008-09-29 15:02:02 UTC
Can you please attach PS/PDF/SVG of both 1.6.x and 1.8.0 please? Plus one screenshot of what you consider correct rendering. I know sent some of these to the list, but I didn't see PDF/SVG output of it. Thanks, Created attachment 19290 [details]
Result that works ok, legend is full and theres about 20 "X"
note that the legend labels extend all the way and that there's about 20 X
I looked at the ps file both on a linux box and a Mac OS X, (ps generated originally on Linux) and I see the error (next attachement on both platform)
Created attachment 19291 [details]
bad file, only a few "X" legend label are also cropped
same C code but run linked against 1.7.6
Created attachment 19292 [details]
the FULL C code, not just the snippet
In the test case, you take a landscape page, rotate it into a portrait orientation and then proceed to draw on it as if it were still in landscape configuration. The two postscript examples display identically using GhostScript and match the description above of the drawing being in the wrong orientation wrt the page, and match the output of the test case. Which ghostcritp do you use? I'm using the latest C. On Sep 29, 2008, at 3:49 PM, bugzilla-daemon@freedesktop.org wrote: > http:// bugs.freedesktop.org/show_bug.cgi?id=17830 > > > > > > --- Comment #5 from Chris Wilson <chris@chris-wilson.co.uk> > 2008-09-29 15:49:25 PST --- > In the test case, you take a landscape page, rotate it into a portrait > orientation and then proceed to draw on it as if it were still in > landscape > configuration. > > The two postscript examples display identically using GhostScript > and match the > description above of the drawing being in the wrong orientation wrt > the page, > and match the output of the test case. > > > -- > Configure bugmail: http:// bugs.freedesktop.org/userprefs.cgi? > tab=email > ------- You are receiving this mail because: ------- > You reported the bug. > Finally I understand... You're not telling gs the size of the page you've drawn but leaving it to gs to automatically choose. You've transposed your page dimensions in the call to cairo_ps_surface_create() [and in the rotation function]. Add a cairo_rectangle (cr, 0, 0, 792, 612); cairo_clip (cr); immediately after the cairo_create (surface); (or even just a cairo_paint(cr); to fill the background with black) and hopefully you'll see what's going on. Ok that confirms what I thought it doesn't know I rotated the plot. Even if my rotation is badly implemented then the actual grpahics should be consistently cropped in a similar manner as the text. What do you recommend i change in my rotation/translation in order to get the text to appear again ? I have to admit I'm lost here. Not sure what to do next? Is it a problem with my code or the text portion of cairo ? (or both?) Thanks for any help on how to fix this, I would like to move to cairo 1.8.0 C. (In reply to comment #7) > Finally I understand... You're not telling gs the size of the page you've drawn > but leaving it to gs to automatically choose. You've transposed your page > dimensions in the call to cairo_ps_surface_create() [and in the rotation > function]. > > Add a cairo_rectangle (cr, 0, 0, 792, 612); cairo_clip (cr); immediately after > the cairo_create (surface); (or even just a cairo_paint(cr); to fill the > background with black) and hopefully you'll see what's going on. > Closing this as it is not a bug but the result of drawing outside of the page due to transposed page dimensions. I described how to create a landscape page in this message: http://lists.cairographics.org/archives/cairo/2008-October/015366.html |
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.