From b75dd982f18ce02781ce2a36e630860153f96ec9 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 23 Feb 2012 02:19:12 +0100 Subject: Test both coordinates when checking for empty/infinite rect and bboxes. --- fitz/fitz.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fitz') diff --git a/fitz/fitz.h b/fitz/fitz.h index d80204f0..6427537f 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -545,7 +545,7 @@ extern const fz_bbox fz_infinite_bbox; An empty rectangle is defined as one whose area is zero. */ -#define fz_is_empty_rect(r) ((r).x0 == (r).x1) +#define fz_is_empty_rect(r) ((r).x0 == (r).x1 || (r).y0 == (r).y1) /* fz_is_empty_bbox: Check if bounding box is empty. @@ -553,7 +553,7 @@ extern const fz_bbox fz_infinite_bbox; Same definition of empty bounding boxes as for empty rectangles. See fz_is_empty_rect. */ -#define fz_is_empty_bbox(b) ((b).x0 == (b).x1) +#define fz_is_empty_bbox(b) ((b).x0 == (b).x1 || (b).y0 == (b).y1) /* fz_is_infinite: Check if rectangle is infinite. @@ -561,7 +561,7 @@ extern const fz_bbox fz_infinite_bbox; An infinite rectangle is defined as one where either of the two relationships between corner coordinates are not true. */ -#define fz_is_infinite_rect(r) ((r).x0 > (r).x1) +#define fz_is_infinite_rect(r) ((r).x0 > (r).x1 || (r).y0 > (r).y1) /* fz_is_infinite_bbox: Check if bounding box is infinite. @@ -569,7 +569,7 @@ extern const fz_bbox fz_infinite_bbox; Same definition of infinite bounding boxes as for infinite rectangles. See fz_is_infinite_rect. */ -#define fz_is_infinite_bbox(b) ((b).x0 > (b).x1) +#define fz_is_infinite_bbox(b) ((b).x0 > (b).x1 || (b).y0 > (b).y1) /* fz_matrix is a a row-major 3x3 matrix used for representing -- cgit v1.2.3