From: Charlie Brej Date: Sun, 22 Nov 2009 22:42:13 +0000 (+0000) Subject: [region] Couple more minor bugs in rectangle merge X-Git-Tag: 0.8.0~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc115710493d11c2fb8d3e2f4b39d4df4a01ce31;p=thirdparty%2Fplymouth.git [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. --- 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;