Commit a3e741fd authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

gdi32/enhmfdrv: Fix PolyBezierTo bounding box computation.

parent 2ba79903
......@@ -348,10 +348,22 @@ EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType )
emr->emr.iType = iType;
emr->emr.nSize = size;
if(iType == EMR_POLYBEZIERTO) {
POINT cur_pt;
GetCurrentPositionEx( dev->hdc, &cur_pt );
emr->rclBounds.left = emr->rclBounds.right = cur_pt.x;
emr->rclBounds.top = emr->rclBounds.bottom = cur_pt.y;
i = 0;
}
else
{
emr->rclBounds.left = emr->rclBounds.right = pt[0].x;
emr->rclBounds.top = emr->rclBounds.bottom = pt[0].y;
i = 1;
}
for(i = 1; i < count; i++) {
for(; i < count; i++) {
if(pt[i].x < emr->rclBounds.left)
emr->rclBounds.left = pt[i].x;
else if(pt[i].x > emr->rclBounds.right)
......@@ -402,10 +414,22 @@ EMFDRV_Polylinegon16( PHYSDEV dev, const POINT* pt, INT count, DWORD iType )
emr->emr.iType = iType;
emr->emr.nSize = size;
if(iType == EMR_POLYBEZIERTO16) {
POINT cur_pt;
GetCurrentPositionEx( dev->hdc, &cur_pt );
emr->rclBounds.left = emr->rclBounds.right = cur_pt.x;
emr->rclBounds.top = emr->rclBounds.bottom = cur_pt.y;
i = 0;
}
else
{
emr->rclBounds.left = emr->rclBounds.right = pt[0].x;
emr->rclBounds.top = emr->rclBounds.bottom = pt[0].y;
i = 1;
}
for(i = 1; i < count; i++) {
for(; i < count; i++) {
if(pt[i].x < emr->rclBounds.left)
emr->rclBounds.left = pt[i].x;
else if(pt[i].x > emr->rclBounds.right)
......
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