[14/19] gdiplus: added GdipSetImageAttributesColorMatrix stub

Evan Stade estade at gmail.com
Tue Aug 7 20:42:48 CDT 2007


Hi,

 dlls/gdiplus/gdiplus.spec      |    2 +-
 dlls/gdiplus/imageattributes.c |   15 +++++++++++++++
 include/gdipluscolormatrix.h   |   14 ++++++++++++++
 include/gdiplusflat.h          |    3 +++
 4 files changed, 33 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 8be35fa..882a26e 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -523,7 +523,7 @@
 @ stub GdipSetEmpty
 @ stub GdipSetImageAttributesCachedBackground
 @ stdcall GdipSetImageAttributesColorKeys(ptr long long long long)
-@ stub GdipSetImageAttributesColorMatrix
+@ stdcall GdipSetImageAttributesColorMatrix(ptr long long ptr ptr long)
 @ stub GdipSetImageAttributesGamma
 @ stub GdipSetImageAttributesNoOp
 @ stub GdipSetImageAttributesOutputChannel
diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c
index bfef8b3..ac6caa5 100644
--- a/dlls/gdiplus/imageattributes.c
+++ b/dlls/gdiplus/imageattributes.c
@@ -62,6 +62,21 @@ GpStatus WINGDIPAPI GdipSetImageAttribut
     return NotImplemented;
 }
 
+GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
+    ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix,
+    GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags flags)
+{
+    static int calls;
+
+    if(!imageattr || !colorMatrix || !grayMatrix)
+        return InvalidParameter;
+
+    if(!(calls++))
+        FIXME("not implemented\n");
+
+    return NotImplemented;
+}
+
 GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr,
     WrapMode wrap, ARGB argb, BOOL clamp)
 {
diff --git a/include/gdipluscolormatrix.h b/include/gdipluscolormatrix.h
index 893471c..afc04c0 100644
--- a/include/gdipluscolormatrix.h
+++ b/include/gdipluscolormatrix.h
@@ -19,6 +19,18 @@
 #ifndef _GDIPLUSCOLORMATRIX_H
 #define _GDIPLUSCOLORMATRIX_H
 
+struct ColorMatrix
+{
+    REAL m[5][5];
+};
+
+enum ColorMatrixFlags
+{
+    ColorMatrixFlagsDefault    = 0,
+    ColorMatrixFlagsSkipGrays  = 1,
+    ColorMatrixFlagsAltGray    = 2
+};
+
 enum ColorAdjustType
 {
     ColorAdjustTypeDefault,
@@ -33,6 +45,8 @@ enum ColorAdjustType
 #ifndef __cplusplus
 
 typedef enum ColorAdjustType ColorAdjustType;
+typedef enum ColorMatrixFlags ColorMatrixFlags;
+typedef struct ColorMatrix ColorMatrix;
 
 #endif  /* end of c typedefs */
 
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index b103801..42df922 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -203,6 +203,9 @@ GpStatus WINGDIPAPI GdipCreateImageAttri
 GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*);
 GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes*,
     ColorAdjustType,BOOL,ARGB,ARGB);
+GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,
+    ColorAdjustType,BOOL,GDIPCONST ColorMatrix*,GDIPCONST ColorMatrix*,
+    ColorMatrixFlags);
 GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,
     ARGB,BOOL);
 
-- 
1.4.1


More information about the wine-patches mailing list