summaryrefslogtreecommitdiff
path: root/draw/draw_affine.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-03-15 20:12:18 +0000
committerRobin Watts <robin.watts@artifex.com>2012-03-16 11:43:42 +0000
commit5409d2f3ba310b59074ec590ea69ecd423653d85 (patch)
tree8fa668767328919e93d294e031c6438a5e08c434 /draw/draw_affine.c
parentfa05641381427855c7ce45138572aa44178d2a25 (diff)
downloadmupdf-5409d2f3ba310b59074ec590ea69ecd423653d85.tar.xz
Bug 692805: BBox rounding issues
Currently all conversions from rect to bbox are done using a single function, fz_round_rect. This causes problems, as sometimes we want 'round, allowing for slight calculation errors' and sometimes we want 'round slavishly to ensure we have a bbox that covers the rect'. We therefore split these 2 cases into 2 separate functions; fz_round_rect is kept, meaning "round outwards allowing for slight errors", and fz_bbox_covering_rect is added to mean "give us the smallest bbox that is guaranteed to cover rect". No regressions seen.
Diffstat (limited to 'draw/draw_affine.c')
-rw-r--r--draw/draw_affine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/draw/draw_affine.c b/draw/draw_affine.c
index 67361faf..483fcfd2 100644
--- a/draw/draw_affine.c
+++ b/draw/draw_affine.c
@@ -629,7 +629,7 @@ fz_paint_image_imp(fz_pixmap *dst, fz_bbox scissor, fz_pixmap *shape, fz_pixmap
dolerp = 0;
}
- bbox = fz_round_rect(fz_transform_rect(ctm, fz_unit_rect));
+ bbox = fz_bbox_covering_rect(fz_transform_rect(ctm, fz_unit_rect));
bbox = fz_intersect_bbox(bbox, scissor);
x = bbox.x0;
if (shape && shape->x > x)