[cairo-bugs] [Bug 36595] New: cairo_set_pdf_surface() is ignored at page 1

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 25 15:48:33 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=36595

           Summary: cairo_set_pdf_surface() is ignored at page 1
           Product: cairo
           Version: 1.10.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: medium
         Component: pdf backend
        AssignedTo: ajohnson at redneon.com
        ReportedBy: volkerobhof at web.de
         QAContact: cairo-bugs at cairographics.org


Created an attachment (id=46069)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=46069)
test file

I created a sample code for demonstrating the problem.

At page two lines are drawn correctly but not on page 1. After setting
cairo_pdf_surface_set_size() I expected that the surface is reset to the new
size but it isn't. Lines are shown at page two for the first time and so I
think it is a bug. 


sample code:


cairo_surface_t *su = cairo_pdf_surface_create("test.pdf", 1, 1);
cairo_t *cr;

cr = cairo_create(su);


cairo_pdf_surface_set_size(su, 580, 900);

cairo_move_to (cr, 128.0, 25.6);
cairo_line_to (cr, 230.4, 230.4);
cairo_rel_line_to (cr, -102.4, 0.0);
cairo_curve_to (cr, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);

cairo_stroke (cr);


cairo_show_page(cr);


cairo_pdf_surface_set_size(su, 580, 900);

cairo_move_to (cr, 128.0, 25.6);
cairo_line_to (cr, 230.4, 230.4);
cairo_rel_line_to (cr, -102.4, 0.0);
cairo_curve_to (cr, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);

cairo_stroke (cr);


cairo_show_page(cr);


cairo_surface_destroy(su);
cairo_destroy(cr);

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list