gdiplus: Use UnitPixel for metafile bounds when creating from HMETAFILE.
This commit is contained in:
parent
f6e923b55d
commit
2f9c6091fc
|
@ -1273,10 +1273,10 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
|
|||
(*metafile)->bounds.X = ((REAL) placeable->BoundingBox.Left) / ((REAL) placeable->Inch);
|
||||
(*metafile)->bounds.Y = ((REAL) placeable->BoundingBox.Top) / ((REAL) placeable->Inch);
|
||||
(*metafile)->bounds.Width = ((REAL) (placeable->BoundingBox.Right
|
||||
- placeable->BoundingBox.Left)) / ((REAL) placeable->Inch);
|
||||
- placeable->BoundingBox.Left));
|
||||
(*metafile)->bounds.Height = ((REAL) (placeable->BoundingBox.Bottom
|
||||
- placeable->BoundingBox.Top)) / ((REAL) placeable->Inch);
|
||||
(*metafile)->unit = UnitInch;
|
||||
- placeable->BoundingBox.Top));
|
||||
(*metafile)->unit = UnitPixel;
|
||||
|
||||
if(delete)
|
||||
DeleteMetaFile(hwmf);
|
||||
|
|
|
@ -942,11 +942,11 @@ static void test_createfromwmf(void)
|
|||
|
||||
stat = GdipGetImageBounds(img, &bounds, &unit);
|
||||
expect(Ok, stat);
|
||||
todo_wine expect(UnitPixel, unit);
|
||||
expect(UnitPixel, unit);
|
||||
expectf(0.0, bounds.X);
|
||||
expectf(0.0, bounds.Y);
|
||||
todo_wine expectf(320.0, bounds.Width);
|
||||
todo_wine expectf(320.0, bounds.Height);
|
||||
expectf(320.0, bounds.Width);
|
||||
expectf(320.0, bounds.Height);
|
||||
|
||||
stat = GdipGetImageHorizontalResolution(img, &res);
|
||||
expect(Ok, stat);
|
||||
|
|
Loading…
Reference in New Issue