2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "gdiplus_private.h"
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
30 GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr,
31 GpImageAttributes **cloneImageattr)
35 TRACE("(%p, %p)\n", imageattr, cloneImageattr);
37 if(!imageattr || !cloneImageattr)
38 return InvalidParameter;
40 stat = GdipCreateImageAttributes(cloneImageattr);
43 **cloneImageattr = *imageattr;
48 GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
50 TRACE("(%p)\n", imageattr);
53 return InvalidParameter;
55 *imageattr = GdipAlloc(sizeof(GpImageAttributes));
56 if(!*imageattr) return OutOfMemory;
61 GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
63 TRACE("(%p)\n", imageattr);
66 return InvalidParameter;
73 GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
74 ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
76 TRACE("(%p,%u,%i,%08x,%08x)\n", imageattr, type, enableFlag, colorLow, colorHigh);
78 if(!imageattr || type >= ColorAdjustTypeCount)
79 return InvalidParameter;
81 imageattr->colorkeys[type].enabled = enableFlag;
82 imageattr->colorkeys[type].low = colorLow;
83 imageattr->colorkeys[type].high = colorHigh;
88 GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
89 ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix,
90 GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags flags)
92 TRACE("(%p,%u,%i,%p,%p,%u)\n", imageattr, type, enableFlag, colorMatrix,
95 if(!imageattr || type >= ColorAdjustTypeCount || flags > ColorMatrixFlagsAltGray)
96 return InvalidParameter;
101 return InvalidParameter;
103 if (flags == ColorMatrixFlagsAltGray)
106 return InvalidParameter;
108 imageattr->colormatrices[type].graymatrix = *grayMatrix;
111 imageattr->colormatrices[type].colormatrix = *colorMatrix;
112 imageattr->colormatrices[type].flags = flags;
115 imageattr->colormatrices[type].enabled = enableFlag;
120 GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr,
121 WrapMode wrap, ARGB argb, BOOL clamp)
126 return InvalidParameter;
129 FIXME("not implemented\n");
131 return NotImplemented;
134 GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes *imageAttr,
140 FIXME("not implemented\n");
142 return NotImplemented;
145 GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr,
146 ColorAdjustType type, BOOL enableFlag, REAL gamma)
151 FIXME("not implemented\n");
153 return NotImplemented;
156 GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageAttr,
157 ColorAdjustType type, BOOL enableFlag)
162 FIXME("not implemented\n");
164 return NotImplemented;
167 GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageAttr,
168 ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)
173 FIXME("not implemented\n");
175 return NotImplemented;
178 GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageAttr,
179 ColorAdjustType type, BOOL enableFlag,
180 GDIPCONST WCHAR *colorProfileFilename)
185 FIXME("not implemented\n");
187 return NotImplemented;
190 GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAttr,
191 ColorAdjustType type, BOOL enableFlag, UINT mapSize,
192 GDIPCONST ColorMap *map)
197 FIXME("not implemented\n");
199 return NotImplemented;
202 GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes *imageAttr,
203 ColorAdjustType type, BOOL enableFlag, REAL threshold)
208 FIXME("not implemented\n");
210 return NotImplemented;
213 GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageAttr,
214 ColorAdjustType type)
219 FIXME("not implemented\n");
221 return NotImplemented;