http://git.etersoft.ru/projects
/
wine
/
eterwine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3ca6be
)
gdiplus: Don't require an HDC to get the resolution of a graphics object.
author
Vincent Povirk
<vincent@codeweavers.com>
Sun, 8 Aug 2010 20:53:08 +0000
(15:53 -0500)
committer
Alexandre Julliard
<julliard@winehq.org>
Tue, 17 Aug 2010 09:55:33 +0000
(11:55 +0200)
dlls/gdiplus/graphics.c
patch
|
blob
|
blame
|
history
diff --git
a/dlls/gdiplus/graphics.c
b/dlls/gdiplus/graphics.c
index ccec25d306c8129c2869c3d818dcfa7d8df87be2..79290b5967638ccb8d504705efef9cfda84cd5bb 100644
(file)
--- a/
dlls/gdiplus/graphics.c
+++ b/
dlls/gdiplus/graphics.c
@@
-4574,7
+4574,10
@@
GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics *graphics, REAL* dpi)
if(graphics->busy)
return ObjectBusy;
- *dpi = (REAL)GetDeviceCaps(graphics->hdc, LOGPIXELSX);
+ if (graphics->image)
+ *dpi = graphics->image->xres;
+ else
+ *dpi = (REAL)GetDeviceCaps(graphics->hdc, LOGPIXELSX);
return Ok;
}
@@
-4589,7
+4592,10
@@
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL* dpi)
if(graphics->busy)
return ObjectBusy;
- *dpi = (REAL)GetDeviceCaps(graphics->hdc, LOGPIXELSY);
+ if (graphics->image)
+ *dpi = graphics->image->yres;
+ else
+ *dpi = (REAL)GetDeviceCaps(graphics->hdc, LOGPIXELSY);
return Ok;
}