Module: wine Branch: master Commit: a93e61d377f03d390dddfb19b8f8c3a135e71def URL: http://source.winehq.org/git/wine.git/?a=commit;h=a93e61d377f03d390dddfb19b8...
Author: Evan Stade estade@gmail.com Date: Tue Aug 7 18:42:48 2007 -0700
gdiplus: Added GdipSetImageAttributesColorMatrix stub.
---
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(-)
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 GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr 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 GdipCreateImageAttributes(GpImageAttributes**); 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);