From dc115710493d11c2fb8d3e2f4b39d4df4a01ce31 Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Sun, 22 Nov 2009 22:42:13 +0000 Subject: [PATCH] [region] Couple more minor bugs in rectangle merge Also one redundant line. I think this code was never used in anger. There is a major bug in the rectangle collision code which makes this detection ad-hoc. --- src/libply/ply-region.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libply/ply-region.c b/src/libply/ply-region.c index 8dd7558a..88194bdb 100644 --- a/src/libply/ply-region.c +++ b/src/libply/ply-region.c @@ -199,14 +199,12 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle = copy_rectangle (new_area); - rectangle->y = old_area->y; rectangle->width = old_area->x - new_area->x; rectangle->height = (old_area->y + old_area->height) - new_area->y; merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = (new_area->y + new_area->height) - (old_area->y + old_area->height); - new_area->width = new_area->width; new_area->y = old_area->y + old_area->height; } break; @@ -241,8 +239,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, */ case PLY_RECTANGLE_OVERLAP_BOTTOM_AND_SIDE_EDGES: { - old_area->height = (new_area->y + new_area->height) - - (old_area->y + old_area->height); + old_area->height = new_area->y - old_area->y; } break;