Dmitry Timoshkov : gdiplus: If there is no hbitmap associated with GpBitmap then create one.
Alexandre Julliard
julliard at winehq.org
Mon Aug 20 14:16:19 CDT 2012
Module: wine
Branch: master
Commit: 466dfee115c49b0d6f81bd42aa4513730eb2b0f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=466dfee115c49b0d6f81bd42aa4513730eb2b0f4
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Mon Aug 20 12:07:32 2012 +0900
gdiplus: If there is no hbitmap associated with GpBitmap then create one.
---
dlls/gdiplus/graphics.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 2b7a87b..c8fad68 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3094,7 +3094,6 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
if (imageAttributes ||
(graphics->image && graphics->image->type == ImageTypeBitmap) ||
- !((GpBitmap*)image)->hbitmap ||
ptf[1].Y != ptf[0].Y || ptf[2].X != ptf[0].X ||
ptf[1].X - ptf[0].X != srcwidth || ptf[2].Y - ptf[0].Y != srcheight ||
srcx < 0 || srcy < 0 ||
@@ -3281,7 +3280,14 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
}
else
{
- hbitmap = bitmap->hbitmap;
+ if (bitmap->hbitmap)
+ hbitmap = bitmap->hbitmap;
+ else
+ {
+ GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0);
+ temp_bitmap = 1;
+ }
+
hdc = bitmap->hdc;
temp_hdc = (hdc == 0);
}
More information about the wine-cvs
mailing list