Vincent Povirk : gdiplus: Store color key information in ImageAttributes.
Alexandre Julliard
julliard at winehq.org
Mon Aug 3 11:13:19 CDT 2009
Module: wine
Branch: master
Commit: 55ec1d915059a81adce18407de2c06504cf0eab6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=55ec1d915059a81adce18407de2c06504cf0eab6
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Fri Jul 24 17:57:38 2009 -0500
gdiplus: Store color key information in ImageAttributes.
---
dlls/gdiplus/gdiplus_private.h | 7 +++++++
dlls/gdiplus/imageattributes.c | 11 ++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index be881c7..dccc834 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -223,8 +223,15 @@ struct GpCachedBitmap{
GpImage *image;
};
+struct color_key{
+ BOOL enabled;
+ ARGB low;
+ ARGB high;
+};
+
struct GpImageAttributes{
WrapMode wrap;
+ struct color_key colorkeys[ColorAdjustTypeCount];
};
struct GpFont{
diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c
index 55bff18..8f49c67 100644
--- a/dlls/gdiplus/imageattributes.c
+++ b/dlls/gdiplus/imageattributes.c
@@ -68,15 +68,16 @@ GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
{
- static int calls;
+ TRACE("(%p,%u,%i,%08x,%08x)\n", imageattr, type, enableFlag, colorLow, colorHigh);
- if(!imageattr)
+ if(!imageattr || type >= ColorAdjustTypeCount)
return InvalidParameter;
- if(!(calls++))
- FIXME("not implemented\n");
+ imageattr->colorkeys[type].enabled = enableFlag;
+ imageattr->colorkeys[type].low = colorLow;
+ imageattr->colorkeys[type].high = colorHigh;
- return NotImplemented;
+ return Ok;
}
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
More information about the wine-cvs
mailing list