[cairo] [PATCH] Fix intersect_with_boxes() to produce tight clip extents
Taekyun Kim
podain77 at gmail.com
Tue Jun 21 01:19:58 PDT 2011
From: Taekyun Kim <tkq.kim at samsung.com>
Previous code was intersecting extents with infinitely large rectangle.
---
src/cairo-clip.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index a695cd7..e272d54 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -1399,8 +1399,8 @@ intersect_with_boxes (cairo_composite_rectangles_t *extents,
cairo_rectangle_int_t rect;
cairo_box_t box;
- box.p1.x = box.p1.y = INT_MIN;
- box.p2.x = box.p2.y = INT_MAX;
+ box.p1.x = box.p1.y = INT_MAX;
+ box.p2.x = box.p2.y = INT_MIN;
while (num_boxes--) {
if (boxes->p1.x < box.p1.x)
box.p1.x = boxes->p1.x;
--
1.7.1
More information about the cairo
mailing list