Commit b67f39cc authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Merge rectangles horizontally when possible in CreatePolyPolygonRgn.

parent 70d12630
...@@ -2613,12 +2613,15 @@ static void scan_convert( WINEREGION *obj, EdgeTable *ET, INT mode, const RECT * ...@@ -2613,12 +2613,15 @@ static void scan_convert( WINEREGION *obj, EdgeTable *ET, INT mode, const RECT *
{ {
obj->rects[obj->numRects].left = active->bres.minor_axis; obj->rects[obj->numRects].left = active->bres.minor_axis;
obj->rects[obj->numRects].top = y; obj->rects[obj->numRects].top = y;
obj->rects[obj->numRects].bottom = y + 1;
} }
else if (obj->rects[obj->numRects].left != active->bres.minor_axis) else if (obj->rects[obj->numRects].left != active->bres.minor_axis)
{ {
obj->rects[obj->numRects].right = active->bres.minor_axis; /* create new rect only if we can't merge with the previous one */
obj->rects[obj->numRects].bottom = y + 1; if (!obj->numRects || obj->rects[obj->numRects-1].top != y ||
obj->numRects++; obj->rects[obj->numRects-1].right < obj->rects[obj->numRects].left)
obj->numRects++;
obj->rects[obj->numRects-1].right = active->bres.minor_axis;
} }
first = !first; first = !first;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment