[cairo] Bug in cairo_pdf_surface_set_size?

Elmar Braun elmar.braun at sh-p.de
Tue Aug 7 08:28:35 PDT 2007


Hi,

I have a encountered a problem with PDF surfaces when using 
cairo_pdf_surface_set_size. I'm using Cairo 1.4.10. As demanded by the 
documentation, I'm calling cairo_pdf_surface_set_size before any drawing 
operations have taken place.

After resizing, some (but not all) drawing operations are shifted along 
the Y-axis (but not the X-axis). The length of the shift seems to equal 
the growth of the page height by cairo_pdf_surface_set_size.

I've attached a sample program, which draws a rectangle and some text. 
The text always appears in the same place, no matter whether the page 
has been resized or not. But the box is shifted downwards in the resized 
version.

I've tried the same thing with a PS surface (and 
cairo_ps_surface_set_size), and the box always shows up where I expect 
it to show up. So the problem seems specific to PDF surfaces.

On a related note: About a week ago I reported a bug in 
cairo_win32_font_face_create_for_hfont, but I have not received any 
replies. I don't want to nag, but I'm curious: Was it not possible to 
recreate the bug with the sample code I provided? Are the maintainers of 
that code currently busy with more important things? Or did the problem 
occur only due to my fauly use of that function? If so, I'd be grateful 
if someone could point out my mistake to me.

Best Regards,
Elmar
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CairoPDFBug.cpp
Url: http://lists.cairographics.org/archives/cairo/attachments/20070807/72d7bca0/attachment.ksh 


More information about the cairo mailing list