Vincent Povirk : gdiplus: Use UnitPixel for metafile bounds when creating from HMETAFILE.
Alexandre Julliard
julliard at winehq.org
Fri Apr 16 10:56:01 CDT 2010
Module: wine
Branch: master
Commit: 2f9c6091fcecdb7a249b54e3966935e887280b2d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2f9c6091fcecdb7a249b54e3966935e887280b2d
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Apr 15 13:32:44 2010 -0500
gdiplus: Use UnitPixel for metafile bounds when creating from HMETAFILE.
---
dlls/gdiplus/graphics.c | 6 +++---
dlls/gdiplus/tests/image.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 7510fa0..7b3f64f 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -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);
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 0ca22e5..fdfd2b2 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -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);
More information about the wine-cvs
mailing list