From 95a4fce52838db09b24299da7c1caa21831d6562 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Tue, 5 May 2009 15:35:05 +0000 Subject: [PATCH] - Sync gdiplus with Wine 1.1.20 svn path=/trunk/; revision=40796 --- reactos/dll/win32/gdiplus/font.c | 8 +++----- reactos/dll/win32/gdiplus/gdiplus.spec | 2 +- reactos/dll/win32/gdiplus/image.c | 7 +++++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/gdiplus/font.c b/reactos/dll/win32/gdiplus/font.c index 94c93814597..6454765d85c 100644 --- a/reactos/dll/win32/gdiplus/font.c +++ b/reactos/dll/win32/gdiplus/font.c @@ -224,9 +224,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc, if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE)) return GenericError; - GdipCreateFontFromLogfontW(hdc, &lfw, font); - - return Ok; + return GdipCreateFontFromLogfontW(hdc, &lfw, font); } /******************************************************************************* @@ -301,7 +299,7 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family) * * RETURNS * SUCCESS: Ok - * FAILURE: InvalidParamter (font or size was NULL) + * FAILURE: InvalidParameter (font or size was NULL) * * NOTES * Size returned is actually emSize -- not internal size used for drawing. @@ -390,7 +388,7 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, memcpy(lfa, &lfw, FIELD_OFFSET(LOGFONTA,lfFaceName) ); - if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE)) + if(!WideCharToMultiByte(CP_ACP, 0, lfw.lfFaceName, -1, lfa->lfFaceName, LF_FACESIZE, NULL, NULL)) return GenericError; return Ok; diff --git a/reactos/dll/win32/gdiplus/gdiplus.spec b/reactos/dll/win32/gdiplus/gdiplus.spec index 17f4951c9fd..ba9851858a9 100644 --- a/reactos/dll/win32/gdiplus/gdiplus.spec +++ b/reactos/dll/win32/gdiplus/gdiplus.spec @@ -43,7 +43,7 @@ @ stdcall GdipBitmapGetPixel(ptr long long ptr) @ stdcall GdipBitmapLockBits(ptr ptr long long ptr) @ stub GdipBitmapSetPixel -@ stub GdipBitmapSetResolution +@ stdcall GdipBitmapSetResolution(ptr long long) @ stdcall GdipBitmapUnlockBits(ptr ptr) @ stdcall GdipClearPathMarkers(ptr) @ stub GdipCloneBitmapArea diff --git a/reactos/dll/win32/gdiplus/image.c b/reactos/dll/win32/gdiplus/image.c index 8a4dcc27389..55522258891 100644 --- a/reactos/dll/win32/gdiplus/image.c +++ b/reactos/dll/win32/gdiplus/image.c @@ -192,6 +192,13 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, return Ok; } +GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap* bitmap, REAL xdpi, REAL ydpi) +{ + FIXME("(%p, %.2f, %.2f)\n", bitmap, xdpi, ydpi); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap, BitmapData* lockeddata) {