summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-01-25 14:07:29 +0100
committerTor Andersson <tor.andersson@artifex.com>2013-01-30 14:07:21 +0100
commitddb92b7c3fdfcf9bf3d7463dde4e662ca10f79ba (patch)
treef9d960048a60066ab8829af0fe6a22104ef30ee3 /doc
parentd8ad064b0c4bcd539c06c98af070613ff818ee0b (diff)
downloadmupdf-ddb92b7c3fdfcf9bf3d7463dde4e662ca10f79ba.tar.xz
Eliminate fz_bbox in favor of fz_rect everywhere.
Diffstat (limited to 'doc')
-rw-r--r--doc/example.c5
-rw-r--r--doc/multi-threaded.c10
2 files changed, 6 insertions, 9 deletions
diff --git a/doc/example.c b/doc/example.c
index 9ffe7023..b834e3ff 100644
--- a/doc/example.c
+++ b/doc/example.c
@@ -41,9 +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 rect = fz_bound_page(doc, page);
- rect = fz_transform_rect(transform, rect);
- fz_bbox bbox = fz_round_rect(rect);
+ fz_rect bbox = fz_bound_page(doc, page);
+ bbox = 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
diff --git a/doc/multi-threaded.c b/doc/multi-threaded.c
index 68cd568d..b54beb81 100644
--- a/doc/multi-threaded.c
+++ b/doc/multi-threaded.c
@@ -58,7 +58,7 @@ struct data {
// The area of the page to render as obtained by the main
// thread and sent from main to rendering thread.
- fz_bbox bbox;
+ fz_rect bbox;
// This is the result, a pixmap containing the rendered page.
// It is passed first from main thread to the rendering
@@ -79,7 +79,7 @@ renderer(void *data)
int pagenumber = ((struct data *) data)->pagenumber;
fz_context *ctx = ((struct data *) data)->ctx;
fz_display_list *list = ((struct data *) data)->list;
- fz_bbox bbox = ((struct data *) data)->bbox;
+ fz_rect bbox = ((struct data *) data)->bbox;
fz_pixmap *pix = ((struct data *) data)->pix;
fprintf(stderr, "thread at page %d loading!\n", pagenumber);
@@ -180,8 +180,7 @@ int main(int argc, char **argv)
// Compute the bounding box for each page.
- fz_rect rect = fz_bound_page(doc, page);
- fz_bbox bbox = fz_round_rect(rect);
+ fz_rect bbox = fz_bound_page(doc, page);
// Create a display list that will hold the drawing
// commands for the page.
@@ -202,8 +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, bbox);
fz_clear_pixmap_with_value(ctx, pix, 0xff);
// Populate the data structure to be sent to the