Skip to content

Fix wrong paginated surface size (issue #617)

Benjamin Hennion requested to merge Kihanos/cairo:pr/Fix617 into master

Fix #617 (closed)

This PR fixes a bug where the size of the underlying paginated surface is not set properly upon calls to cairo_pdf_surface_set_size or cairo_ps_surface_set_size.

Both cairo_pdf_surface_set_size and cairo_ps_surface_set_size passed on their width and height arguments (of type double) directly to _cairo_paginated_surface_set_size(cairo_paginated_surface_t*, int, int), so the width and height were truncated (i.e. floor) instead of taking their ceil.

A small part of the surface was then inaccessible for drawing (stripes on the right and bottom of the surface).

Merge request reports