diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/example.c | 5 | ||||
-rw-r--r-- | doc/multi-threaded.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/example.c b/doc/example.c index b834e3ff..d1e4798f 100644 --- a/doc/example.c +++ b/doc/example.c @@ -41,8 +41,8 @@ render(char *filename, int pagenumber, int zoom, int rotation) // Take the page bounds and transform them by the same matrix that // we will use to render the page. - fz_rect bbox = fz_bound_page(doc, page); - bbox = fz_transform_rect(transform, rect); + fz_rect bounds = fz_bound_page(doc, page); + bounds = fz_transform_rect(transform, rect); // Create a blank pixmap to hold the result of rendering. The // pixmap bounds used here are the same as the transformed page @@ -50,6 +50,7 @@ render(char *filename, int pagenumber, int zoom, int rotation) // space has the origin at the top left corner and the x axis // extends to the right and the y axis extends down. + fz_irect bbox = fz_round_rect(bounds); fz_pixmap *pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb, bbox); fz_clear_pixmap_with_value(ctx, pix, 0xff); diff --git a/doc/multi-threaded.c b/doc/multi-threaded.c index b54beb81..af4bab97 100644 --- a/doc/multi-threaded.c +++ b/doc/multi-threaded.c @@ -201,7 +201,7 @@ int main(int argc, char **argv) // Create a white pixmap using the correct dimensions. - fz_pixmap *pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb, bbox); + fz_pixmap *pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb, fz_round_rect(bbox)); fz_clear_pixmap_with_value(ctx, pix, 0xff); // Populate the data structure to be sent to the |