Dmitry Timoshkov : gdiplus: Make GdipGetNearestColor print FIXME only if indexed bitmap is associated with the graphics object.

Alexandre Julliard julliard at winehq.org
Mon Feb 10 16:32:46 CST 2020


Module: wine
Branch: master
Commit: 5ca9da2c0197ac1260975c1b7b643dbd11185715
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5ca9da2c0197ac1260975c1b7b643dbd11185715

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Feb  7 18:31:38 2020 +0800

gdiplus: Make GdipGetNearestColor print FIXME only if indexed bitmap is associated with the graphics object.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/graphics.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index c52fa65445..8f3272b281 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4775,7 +4775,7 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
 /* FIXME: Need to handle color depths less than 24bpp */
 GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
 {
-    FIXME("(%p, %p): Passing color unmodified\n", graphics, argb);
+    TRACE("(%p, %p)\n", graphics, argb);
 
     if(!graphics || !argb)
         return InvalidParameter;
@@ -4783,6 +4783,13 @@ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
     if(graphics->busy)
         return ObjectBusy;
 
+    if (graphics->image->type == ImageTypeBitmap)
+    {
+        GpBitmap *bitmap = (GpBitmap *)graphics->image;
+        if (IsIndexedPixelFormat(bitmap->format))
+            FIXME("(%p, %p): Passing color unmodified\n", graphics, argb);
+    }
+
     return Ok;
 }
 




More information about the wine-cvs mailing list