ReactOS 0.4.15-dev-7931-gfd331f1
ImageAttributes Class Reference

#include <gdiplusimageattributes.h>

Inheritance diagram for ImageAttributes:
Collaboration diagram for ImageAttributes:

Public Member Functions

 ImageAttributes ()
 
 ~ImageAttributes ()
 
Status ClearBrushRemapTable ()
 
Status ClearColorKey (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearColorMatrices (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearColorMatrix (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearGamma (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearNoOp (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearOutputChannel (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearOutputChannelColorProfile (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearRemapTable (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status ClearThreshold (ColorAdjustType type=ColorAdjustTypeDefault)
 
ImageAttributesClone ()
 
Status GetAdjustedPalette (ColorPalette *colorPalette, ColorAdjustType colorAdjustType)
 
Status GetLastStatus ()
 
Status Reset (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetBrushRemapTable (UINT mapSize, ColorMap *map)
 
Status SetColorKey (const Color &colorLow, const Color &colorHigh, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetColorMatrices (const ColorMatrix *colorMatrix, const ColorMatrix *grayMatrix, ColorMatrixFlags mode=ColorMatrixFlagsDefault, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetColorMatrix (const ColorMatrix *colorMatrix, ColorMatrixFlags mode=ColorMatrixFlagsDefault, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetGamma (REAL gamma, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetNoOp (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetOutputChannel (ColorChannelFlags channelFlags, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetOutputChannelColorProfile (const WCHAR *colorProfileFilename, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetRemapTable (UINT mapSize, const ColorMap *map, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetThreshold (REAL threshold, ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetToIdentity (ColorAdjustType type=ColorAdjustTypeDefault)
 
Status SetWrapMode (WrapMode wrap, const Color &color=Color(), BOOL clamp=FALSE)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Protected Member Functions

 ImageAttributes (GpImageAttributes *imageAttr, Status status)
 
VOID SetNativeImageAttr (GpImageAttributes *imageAttr)
 
Status SetStatus (Status status) const
 

Protected Attributes

GpImageAttributesnativeImageAttr
 
Status lastStatus
 

Private Member Functions

 ImageAttributes (const ImageAttributes &)
 
ImageAttributesoperator= (const ImageAttributes &)
 

Friends

class TextureBrush
 
GpImageAttributes *& getNat (const ImageAttributes *ia)
 

Detailed Description

Definition at line 22 of file gdiplusimageattributes.h.

Constructor & Destructor Documentation

◆ ImageAttributes() [1/3]

ImageAttributes::ImageAttributes ( )
inline

Definition at line 27 of file gdiplusimageattributes.h.

28 {
29 lastStatus = DllExports::GdipCreateImageAttributes(&nativeImageAttr);
30 }
GpImageAttributes * nativeImageAttr
#define NULL
Definition: types.h:112

Referenced by Clone().

◆ ~ImageAttributes()

ImageAttributes::~ImageAttributes ( )
inline

Definition at line 32 of file gdiplusimageattributes.h.

33 {
34 DllExports::GdipDisposeImageAttributes(nativeImageAttr);
35 }

◆ ImageAttributes() [2/3]

ImageAttributes::ImageAttributes ( GpImageAttributes imageAttr,
Status  status 
)
inlineprotected

Definition at line 223 of file gdiplusimageattributes.h.

223 : nativeImageAttr(imageAttr), lastStatus(status)
224 {
225 }
Definition: ps.c:97

◆ ImageAttributes() [3/3]

ImageAttributes::ImageAttributes ( const ImageAttributes )
private

Member Function Documentation

◆ ClearBrushRemapTable()

Status ImageAttributes::ClearBrushRemapTable ( )
inline

Definition at line 38 of file gdiplusimageattributes.h.

39 {
41 }
Status ClearRemapTable(ColorAdjustType type=ColorAdjustTypeDefault)
@ ColorAdjustTypeBrush

◆ ClearColorKey()

Status ImageAttributes::ClearColorKey ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 44 of file gdiplusimageattributes.h.

45 {
46 return SetStatus(DllExports::GdipSetImageAttributesColorKeys(nativeImageAttr, type, FALSE, NULL, NULL));
47 }
Status SetStatus(Status status) const
#define FALSE
Definition: types.h:117
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ ClearColorMatrices()

Status ImageAttributes::ClearColorMatrices ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 50 of file gdiplusimageattributes.h.

51 {
52 return SetStatus(DllExports::GdipSetImageAttributesColorMatrix(
54 }
@ ColorMatrixFlagsDefault

◆ ClearColorMatrix()

Status ImageAttributes::ClearColorMatrix ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 57 of file gdiplusimageattributes.h.

58 {
59 return SetStatus(DllExports::GdipSetImageAttributesColorMatrix(
61 }

◆ ClearGamma()

Status ImageAttributes::ClearGamma ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 64 of file gdiplusimageattributes.h.

65 {
66 return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, FALSE, 0.0));
67 }

◆ ClearNoOp()

Status ImageAttributes::ClearNoOp ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 70 of file gdiplusimageattributes.h.

71 {
72 return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, FALSE));
73 }

◆ ClearOutputChannel()

Status ImageAttributes::ClearOutputChannel ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 76 of file gdiplusimageattributes.h.

77 {
78 return SetStatus(
79 DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, FALSE, ColorChannelFlagsLast));
80 }
@ ColorChannelFlagsLast
Definition: gdipluscolor.h:30

◆ ClearOutputChannelColorProfile()

Status ImageAttributes::ClearOutputChannelColorProfile ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 83 of file gdiplusimageattributes.h.

84 {
85 return SetStatus(
86 DllExports::GdipSetImageAttributesOutputChannelColorProfile(nativeImageAttr, type, FALSE, NULL));
87 }

◆ ClearRemapTable()

Status ImageAttributes::ClearRemapTable ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 90 of file gdiplusimageattributes.h.

91 {
92 return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, FALSE, 0, NULL));
93 }

Referenced by ClearBrushRemapTable().

◆ ClearThreshold()

Status ImageAttributes::ClearThreshold ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 96 of file gdiplusimageattributes.h.

97 {
98 return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, FALSE, 0.0));
99 }

◆ Clone()

ImageAttributes * ImageAttributes::Clone ( )
inline

Definition at line 102 of file gdiplusimageattributes.h.

103 {
104 GpImageAttributes *clone = NULL;
105 SetStatus(DllExports::GdipCloneImageAttributes(nativeImageAttr, &clone));
106 if (lastStatus != Ok)
107 return NULL;
108
109 ImageAttributes *newImageAttr = new ImageAttributes(clone, lastStatus);
110 if (newImageAttr == NULL)
111 SetStatus(DllExports::GdipDisposeImageAttributes(clone));
112
113 return newImageAttr;
114 }
@ Ok
Definition: gdiplustypes.h:26

◆ GetAdjustedPalette()

Status ImageAttributes::GetAdjustedPalette ( ColorPalette colorPalette,
ColorAdjustType  colorAdjustType 
)
inline

Definition at line 117 of file gdiplusimageattributes.h.

118 {
119 return SetStatus(
120 DllExports::GdipGetImageAttributesAdjustedPalette(nativeImageAttr, colorPalette, colorAdjustType));
121 }

◆ GetLastStatus()

Status ImageAttributes::GetLastStatus ( )
inline

Definition at line 124 of file gdiplusimageattributes.h.

125 {
126 return lastStatus;
127 }

◆ operator=()

ImageAttributes & ImageAttributes::operator= ( const ImageAttributes )
private

◆ Reset()

Status ImageAttributes::Reset ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 130 of file gdiplusimageattributes.h.

131 {
132 return SetStatus(DllExports::GdipResetImageAttributes(nativeImageAttr, type));
133 }

◆ SetBrushRemapTable()

Status ImageAttributes::SetBrushRemapTable ( UINT  mapSize,
ColorMap map 
)
inline

Definition at line 136 of file gdiplusimageattributes.h.

137 {
138 return SetRemapTable(mapSize, map, ColorAdjustTypeBrush);
139 }
Status SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type=ColorAdjustTypeDefault)
Definition: _map.h:48

◆ SetColorKey()

Status ImageAttributes::SetColorKey ( const Color colorLow,
const Color colorHigh,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 142 of file gdiplusimageattributes.h.

143 {
144 return SetStatus(DllExports::GdipSetImageAttributesColorKeys(
145 nativeImageAttr, type, TRUE, colorLow.GetValue(), colorHigh.GetValue()));
146 }
#define TRUE
Definition: types.h:120

◆ SetColorMatrices()

Status ImageAttributes::SetColorMatrices ( const ColorMatrix colorMatrix,
const ColorMatrix grayMatrix,
ColorMatrixFlags  mode = ColorMatrixFlagsDefault,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 149 of file gdiplusimageattributes.h.

154 {
155 return SetStatus(
156 DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, grayMatrix, mode));
157 }
GLenum mode
Definition: glext.h:6217

◆ SetColorMatrix()

Status ImageAttributes::SetColorMatrix ( const ColorMatrix colorMatrix,
ColorMatrixFlags  mode = ColorMatrixFlagsDefault,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 160 of file gdiplusimageattributes.h.

164 {
165 return SetStatus(
166 DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, NULL, mode));
167 }

◆ SetGamma()

Status ImageAttributes::SetGamma ( REAL  gamma,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 170 of file gdiplusimageattributes.h.

171 {
172 return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, TRUE, gamma));
173 }

◆ SetNativeImageAttr()

VOID ImageAttributes::SetNativeImageAttr ( GpImageAttributes imageAttr)
inlineprotected

Definition at line 228 of file gdiplusimageattributes.h.

229 {
230 nativeImageAttr = imageAttr;
231 }

◆ SetNoOp()

Status ImageAttributes::SetNoOp ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 176 of file gdiplusimageattributes.h.

177 {
178 return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, TRUE));
179 }

◆ SetOutputChannel()

Status ImageAttributes::SetOutputChannel ( ColorChannelFlags  channelFlags,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 182 of file gdiplusimageattributes.h.

183 {
184 return SetStatus(DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, TRUE, channelFlags));
185 }

◆ SetOutputChannelColorProfile()

Status ImageAttributes::SetOutputChannelColorProfile ( const WCHAR colorProfileFilename,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 188 of file gdiplusimageattributes.h.

189 {
190 return SetStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile(
191 nativeImageAttr, type, TRUE, colorProfileFilename));
192 }

◆ SetRemapTable()

Status ImageAttributes::SetRemapTable ( UINT  mapSize,
const ColorMap map,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 195 of file gdiplusimageattributes.h.

196 {
197 return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, TRUE, mapSize, map));
198 }

Referenced by SetBrushRemapTable().

◆ SetStatus()

◆ SetThreshold()

Status ImageAttributes::SetThreshold ( REAL  threshold,
ColorAdjustType  type = ColorAdjustTypeDefault 
)
inline

Definition at line 201 of file gdiplusimageattributes.h.

202 {
203 return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, TRUE, threshold));
204 }

◆ SetToIdentity()

Status ImageAttributes::SetToIdentity ( ColorAdjustType  type = ColorAdjustTypeDefault)
inline

Definition at line 207 of file gdiplusimageattributes.h.

208 {
209 return SetStatus(DllExports::GdipSetImageAttributesToIdentity(nativeImageAttr, type));
210 }

◆ SetWrapMode()

Status ImageAttributes::SetWrapMode ( WrapMode  wrap,
const Color color = Color(),
BOOL  clamp = FALSE 
)
inline

Definition at line 213 of file gdiplusimageattributes.h.

214 {
215 ARGB argb = color.GetValue();
216 return SetStatus(DllExports::GdipSetImageAttributesWrapMode(nativeImageAttr, wrap, argb, clamp));
217 }
#define wrap(journal, var)
Definition: recovery.c:207
DWORD ARGB
GLenum clamp
Definition: glext.h:6216
GLuint color
Definition: glext.h:6243

Friends And Related Function Documentation

◆ getNat

GpImageAttributes *& getNat ( const ImageAttributes ia)
friend

Definition at line 249 of file gdiplusimageattributes.h.

250 {
251 return const_cast<ImageAttributes *>(ia)->nativeImageAttr;
252 }

◆ TextureBrush

friend class TextureBrush
friend

Definition at line 25 of file gdiplusimageattributes.h.

Member Data Documentation

◆ lastStatus

Status ImageAttributes::lastStatus
mutableprotected

Definition at line 221 of file gdiplusimageattributes.h.

Referenced by Clone(), GetLastStatus(), ImageAttributes(), and SetStatus().

◆ nativeImageAttr


The documentation for this class was generated from the following file: