ReactOS  0.4.15-dev-1150-g593bcce
gdiplusimageattributes.h
Go to the documentation of this file.
1 /*
2  * GdiPlusImageAttributes.h
3  *
4  * Windows GDI+
5  *
6  * This file is part of the w32api package.
7  *
8  * THIS SOFTWARE IS NOT COPYRIGHTED
9  *
10  * This source code is offered for use in the public domain. You may
11  * use, modify or distribute it freely.
12  *
13  * This code is distributed in the hope that it will be useful but
14  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
15  * DISCLAIMED. This includes but is not limited to warranties of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  */
18 
19 #ifndef _GDIPLUSIMAGEATTRIBUTES_H
20 #define _GDIPLUSIMAGEATTRIBUTES_H
21 
23 {
24  public:
25  friend class TextureBrush;
26 
28  {
30  }
31 
33  {
35  }
36 
37  Status
39  {
41  }
42 
43  Status
45  {
47  }
48 
49  Status
51  {
54  }
55 
56  Status
58  {
61  }
62 
63  Status
65  {
67  }
68 
69  Status
71  {
73  }
74 
75  Status
77  {
78  return SetStatus(
80  }
81 
82  Status
84  {
85  return SetStatus(
87  }
88 
89  Status
91  {
93  }
94 
95  Status
97  {
99  }
100 
103  {
104  GpImageAttributes *clone = NULL;
106  if (lastStatus != Ok)
107  return NULL;
108 
109  ImageAttributes *newImageAttr = new ImageAttributes(clone, lastStatus);
110  if (newImageAttr == NULL)
112 
113  return newImageAttr;
114  }
115 
116  Status
117  GetAdjustedPalette(ColorPalette *colorPalette, ColorAdjustType colorAdjustType)
118  {
119  return SetStatus(
121  }
122 
123  Status
125  {
126  return lastStatus;
127  }
128 
129  Status
131  {
133  }
134 
135  Status
137  {
138  return SetRemapTable(mapSize, map, ColorAdjustTypeBrush);
139  }
140 
141  Status
142  SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type = ColorAdjustTypeDefault)
143  {
145  nativeImageAttr, type, TRUE, colorLow.GetValue(), colorHigh.GetValue()));
146  }
147 
148  Status
150  const ColorMatrix *colorMatrix,
151  const ColorMatrix *grayMatrix,
154  {
155  return SetStatus(
157  }
158 
159  Status
161  const ColorMatrix *colorMatrix,
164  {
165  return SetStatus(
167  }
168 
169  Status
171  {
173  }
174 
175  Status
177  {
179  }
180 
181  Status
183  {
185  }
186 
187  Status
189  {
191  nativeImageAttr, type, TRUE, colorProfileFilename));
192  }
193 
194  Status
196  {
198  }
199 
200  Status
202  {
204  }
205 
206  Status
208  {
210  }
211 
212  Status
214  {
215  ARGB argb = color.GetValue();
217  }
218 
219  protected:
222 
224  {
225  }
226 
227  VOID
229  {
230  nativeImageAttr = imageAttr;
231  }
232 
233  Status
235  {
236  if (status != Ok)
237  lastStatus = status;
238  return status;
239  }
240 
241  private:
242  // ImageAttributes is not copyable
245  operator=(const ImageAttributes &);
246 
247  // get native
248  friend inline GpImageAttributes *&
250  {
251  return const_cast<ImageAttributes *>(ia)->nativeImageAttr;
252  }
253 };
254 
255 #endif /* _GDIPLUSIMAGEATTRIBUTES_H */
Status GetAdjustedPalette(ColorPalette *colorPalette, ColorAdjustType colorAdjustType)
GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL threshold)
Status ClearColorMatrix(ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL gamma)
Status ClearRemapTable(ColorAdjustType type=ColorAdjustTypeDefault)
WrapMode
Definition: gdiplusenums.h:205
#define TRUE
Definition: types.h:120
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Status SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type=ColorAdjustTypeDefault)
VOID SetNativeImageAttr(GpImageAttributes *imageAttr)
Status ClearColorKey(ColorAdjustType type=ColorAdjustTypeDefault)
ColorMatrixFlags
ImageAttributes(GpImageAttributes *imageAttr, Status status)
Status ClearOutputChannel(ColorAdjustType type=ColorAdjustTypeDefault)
ColorChannelFlags
Definition: gdipluscolor.h:24
struct Color Color
Status Reset(ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp)
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix *colorMatrix, GDIPCONST ColorMatrix *grayMatrix, ColorMatrixFlags flags)
Status SetNoOp(ColorAdjustType type=ColorAdjustTypeDefault)
ColorAdjustType
#define FALSE
Definition: types.h:117
GpImageAttributes * nativeImageAttr
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint color
Definition: glext.h:6243
GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr, GpImageAttributes **cloneImageattr)
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, GDIPCONST WCHAR *colorProfileFilename)
Status SetBrushRemapTable(UINT mapSize, ColorMap *map)
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag)
GLenum clamp
Definition: glext.h:6216
Status SetStatus(Status status) const
friend GpImageAttributes *& getNat(const ImageAttributes *ia)
__wchar_t WCHAR
Definition: xmlstorage.h:180
Status SetWrapMode(WrapMode wrap, const Color &color=Color(), BOOL clamp=FALSE)
Status SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type=ColorAdjustTypeDefault)
Status ClearColorMatrices(ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)
Status ClearThreshold(ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)
Status ClearNoOp(ColorAdjustType type=ColorAdjustTypeDefault)
Definition: _map.h:44
Status
Definition: gdiplustypes.h:24
Status SetColorMatrices(const ColorMatrix *colorMatrix, const ColorMatrix *grayMatrix, ColorMatrixFlags mode=ColorMatrixFlagsDefault, ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageAttr, ColorAdjustType type)
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
GLenum mode
Definition: glext.h:6217
Status SetToIdentity(ColorAdjustType type=ColorAdjustTypeDefault)
GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr, ColorAdjustType type)
Status SetColorMatrix(const ColorMatrix *colorMatrix, ColorMatrixFlags mode=ColorMatrixFlagsDefault, ColorAdjustType type=ColorAdjustTypeDefault)
Status SetGamma(REAL gamma, ColorAdjustType type=ColorAdjustTypeDefault)
unsigned int UINT
Definition: ndis.h:50
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
Status SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type=ColorAdjustTypeDefault)
ImageAttributes * Clone()
Status SetThreshold(REAL threshold, ColorAdjustType type=ColorAdjustTypeDefault)
Status ClearOutputChannelColorProfile(ColorAdjustType type=ColorAdjustTypeDefault)
#define wrap(journal, var)
Definition: recovery.c:207
Status ClearGamma(ColorAdjustType type=ColorAdjustTypeDefault)
float REAL
Definition: types.h:41
static SERVICE_STATUS status
Definition: service.c:31
ImageAttributes & operator=(const ImageAttributes &)
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
Status SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type=ColorAdjustTypeDefault)
Definition: ps.c:97
DWORD ARGB
GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes *imageattr, ColorPalette *palette, ColorAdjustType type)