Henri Verbeet : d2d1: Fix the bitmap DPI scale for bitmap brushes.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 21 13:08:51 CDT 2015


Module: wine
Branch: master
Commit: 3b400cad3441e1514d081737da23e6d97e9ee3d1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3b400cad3441e1514d081737da23e6d97e9ee3d1

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Jul 21 08:39:08 2015 +0200

d2d1: Fix the bitmap DPI scale for bitmap brushes.

---

 dlls/d2d1/brush.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
index 28b896b..5c45d3c 100644
--- a/dlls/d2d1/brush.c
+++ b/dlls/d2d1/brush.c
@@ -757,10 +757,10 @@ HRESULT d2d_brush_get_ps_cb(struct d2d_brush *brush, struct d2d_d3d_render_targe
 
         /* Scale for bitmap size and dpi. */
         b = brush->transform;
-        dpi_scale = bitmap->pixel_size.width * (bitmap->dpi_x / 96.0f);
+        dpi_scale = bitmap->pixel_size.width * (96.0f / bitmap->dpi_x);
         b._11 *= dpi_scale;
         b._21 *= dpi_scale;
-        dpi_scale = bitmap->pixel_size.height * (bitmap->dpi_y / 96.0f);
+        dpi_scale = bitmap->pixel_size.height * (96.0f / bitmap->dpi_y);
         b._12 *= dpi_scale;
         b._22 *= dpi_scale;
 




More information about the wine-cvs mailing list