ReactOS 0.4.17-dev-243-g1369312
imageattributes.c File Reference
#include "windef.h"
#include "wingdi.h"
#include "objbase.h"
#include "gdiplus.h"
#include "gdiplus_private.h"
#include "wine/debug.h"
Include dependency graph for imageattributes.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (gdiplus)
 
GpStatus WINGDIPAPI GdipCloneImageAttributes (GDIPCONST GpImageAttributes *imageattr, GpImageAttributes **cloneImageattr)
 
GpStatus WINGDIPAPI GdipCreateImageAttributes (GpImageAttributes **imageattr)
 
GpStatus WINGDIPAPI GdipDisposeImageAttributes (GpImageAttributes *imageattr)
 
GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette (GpImageAttributes *imageattr, ColorPalette *palette, ColorAdjustType type)
 
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
 
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix *colorMatrix, GDIPCONST ColorMatrix *grayMatrix, ColorMatrixFlags flags)
 
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode (GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp)
 
GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground (GpImageAttributes *imageAttr, BOOL enableFlag)
 
GpStatus WINGDIPAPI GdipSetImageAttributesGamma (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL gamma)
 
GpStatus WINGDIPAPI GdipSetImageAttributesNoOp (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag)
 
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)
 
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, GDIPCONST WCHAR *colorProfileFilename)
 
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)
 
GpStatus WINGDIPAPI GdipSetImageAttributesThreshold (GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL threshold)
 
GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity (GpImageAttributes *imageAttr, ColorAdjustType type)
 
GpStatus WINGDIPAPI GdipResetImageAttributes (GpImageAttributes *imageAttr, ColorAdjustType type)
 

Function Documentation

◆ GdipCloneImageAttributes()

GpStatus WINGDIPAPI GdipCloneImageAttributes ( GDIPCONST GpImageAttributes imageattr,
GpImageAttributes **  cloneImageattr 
)

Definition at line 30 of file imageattributes.c.

32{
34 struct color_remap_table remap_tables[ColorAdjustTypeCount] = {{0}};
35 int i;
36
37 TRACE("(%p, %p)\n", imageattr, cloneImageattr);
38
39 if(!imageattr || !cloneImageattr)
40 return InvalidParameter;
41
42 for (i=0; i<ColorAdjustTypeCount; i++)
43 {
44 if (imageattr->colorremaptables[i].enabled)
45 {
46 remap_tables[i].enabled = TRUE;
47 remap_tables[i].mapsize = imageattr->colorremaptables[i].mapsize;
48 remap_tables[i].colormap = malloc(sizeof(ColorMap) * remap_tables[i].mapsize);
49
50 if (remap_tables[i].colormap)
51 {
52 memcpy(remap_tables[i].colormap, imageattr->colorremaptables[i].colormap,
53 sizeof(ColorMap) * remap_tables[i].mapsize);
54 }
55 else
56 {
58 break;
59 }
60 }
61 }
62
63 if (stat == Ok)
64 stat = GdipCreateImageAttributes(cloneImageattr);
65
66 if (stat == Ok)
67 {
68 **cloneImageattr = *imageattr;
69
70 memcpy((*cloneImageattr)->colorremaptables, remap_tables, sizeof(remap_tables));
71 }
72
73 if (stat != Ok)
74 {
75 for (i=0; i<ColorAdjustTypeCount; i++)
76 free(remap_tables[i].colormap);
77 }
78
79 return stat;
80}
#define stat
Definition: acwin.h:100
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define TRUE
Definition: types.h:120
@ ColorAdjustTypeCount
Status
Definition: gdiplustypes.h:24
@ Ok
Definition: gdiplustypes.h:25
@ InvalidParameter
Definition: gdiplustypes.h:27
@ OutOfMemory
Definition: gdiplustypes.h:28
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint mapsize
Definition: glfuncs.h:262
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define TRACE(s)
Definition: solgame.cpp:4
Definition: stat.h:66

Referenced by GdipCreateTextureIA().

◆ GdipCreateImageAttributes()

GpStatus WINGDIPAPI GdipCreateImageAttributes ( GpImageAttributes **  imageattr)

Definition at line 82 of file imageattributes.c.

83{
84 if(!imageattr)
85 return InvalidParameter;
86
87 *imageattr = calloc(1, sizeof(GpImageAttributes));
88 if(!*imageattr) return OutOfMemory;
89
90 (*imageattr)->wrap = WrapModeClamp;
91
92 TRACE("<-- %p\n", *imageattr);
93
94 return Ok;
95}
@ WrapModeClamp
Definition: gdiplusenums.h:209
#define calloc
Definition: rosglue.h:14

Referenced by GdipCloneImageAttributes(), GdipCreateTexture(), GdipCreateTexture2(), GdipCreateTexture2I(), GdipCreateTextureIA(), METAFILE_PlaybackObject(), test_colorkey(), test_colormatrix(), test_drawimage(), test_gamma(), test_getadjustedpalette(), test_remaptable(), and ZoomWnd_OnDraw().

◆ GdipDisposeImageAttributes()

GpStatus WINGDIPAPI GdipDisposeImageAttributes ( GpImageAttributes imageattr)

Definition at line 97 of file imageattributes.c.

98{
99 int i;
100
101 TRACE("(%p)\n", imageattr);
102
103 if(!imageattr)
104 return InvalidParameter;
105
106 for (i=0; i<ColorAdjustTypeCount; i++)
107 free(imageattr->colorremaptables[i].colormap);
108
109 free(imageattr);
110
111 return Ok;
112}
struct color_remap_table colorremaptables[ColorAdjustTypeCount]

Referenced by GdipCreateTexture(), GdipCreateTexture2(), GdipCreateTexture2I(), GdipCreateTextureIA(), GdipDeleteBrush(), metafile_free_object_table_entry(), METAFILE_PlaybackObject(), test_colorkey(), test_colormatrix(), test_drawimage(), test_gamma(), test_getadjustedpalette(), test_remaptable(), and ZoomWnd_OnDraw().

◆ GdipGetImageAttributesAdjustedPalette()

GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette ( GpImageAttributes imageattr,
ColorPalette palette,
ColorAdjustType  type 
)

Definition at line 114 of file imageattributes.c.

116{
117 TRACE("(%p,%p,%u)\n", imageattr, palette, type);
118
119 if (!imageattr || !palette || !palette->Count ||
120#ifdef __REACTOS__
122#else
124#endif
125 return InvalidParameter;
126
127 apply_image_attributes(imageattr, (LPBYTE)palette->Entries, palette->Count, 1, 0,
129
130 return Ok;
131}
PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE data, UINT width, UINT height, INT stride, ColorAdjustType type, PixelFormat fmt)
Definition: graphics.c:796
@ ColorAdjustTypeDefault
#define PixelFormat32bppARGB
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static HPALETTE palette
Definition: clipboard.c:1457
unsigned char * LPBYTE
Definition: typedefs.h:53

Referenced by test_getadjustedpalette().

◆ GdipResetImageAttributes()

GpStatus WINGDIPAPI GdipResetImageAttributes ( GpImageAttributes imageAttr,
ColorAdjustType  type 
)

Definition at line 327 of file imageattributes.c.

329{
330 TRACE("(%p,%u)\n", imageAttr, type);
331
332 if(!imageAttr || type >= ColorAdjustTypeCount)
333 return InvalidParameter;
334
335 memset(&imageAttr->colormatrices[type], 0, sizeof(imageAttr->colormatrices[type]));
336 GdipSetImageAttributesColorKeys(imageAttr, type, FALSE, 0, 0);
338 GdipSetImageAttributesGamma(imageAttr, type, FALSE, 0.0);
339 imageAttr->noop[type] = IMAGEATTR_NOOP_UNDEFINED;
340
341 return Ok;
342}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
@ IMAGEATTR_NOOP_UNDEFINED
GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL gamma)
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)
#define memset(x, y, z)
Definition: compat.h:39
struct color_matrix colormatrices[ColorAdjustTypeCount]
enum imageattr_noop noop[ColorAdjustTypeCount]

Referenced by test_colorkey(), test_colormatrix(), test_gamma(), and test_remaptable().

◆ GdipSetImageAttributesCachedBackground()

GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground ( GpImageAttributes imageAttr,
BOOL  enableFlag 
)

Definition at line 195 of file imageattributes.c.

197{
198 static int calls;
199
200 TRACE("(%p,%i)\n", imageAttr, enableFlag);
201
202 if(!(calls++))
203 FIXME("not implemented\n");
204
205 return NotImplemented;
206}
#define FIXME(fmt,...)
Definition: precomp.h:53
@ NotImplemented
Definition: gdiplustypes.h:31

◆ GdipSetImageAttributesColorKeys()

GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys ( GpImageAttributes imageattr,
ColorAdjustType  type,
BOOL  enableFlag,
ARGB  colorLow,
ARGB  colorHigh 
)

Definition at line 133 of file imageattributes.c.

135{
136 TRACE("(%p,%u,%i,%08lx,%08lx)\n", imageattr, type, enableFlag, colorLow, colorHigh);
137
138 if(!imageattr || type >= ColorAdjustTypeCount)
139 return InvalidParameter;
140
141 imageattr->colorkeys[type].enabled = enableFlag;
142 imageattr->colorkeys[type].low = colorLow;
143 imageattr->colorkeys[type].high = colorHigh;
144
145 return Ok;
146}
struct color_key colorkeys[ColorAdjustTypeCount]

Referenced by GdipResetImageAttributes(), and test_colorkey().

◆ GdipSetImageAttributesColorMatrix()

GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix ( GpImageAttributes imageattr,
ColorAdjustType  type,
BOOL  enableFlag,
GDIPCONST ColorMatrix colorMatrix,
GDIPCONST ColorMatrix grayMatrix,
ColorMatrixFlags  flags 
)

Definition at line 148 of file imageattributes.c.

151{
152 TRACE("(%p,%u,%i,%p,%p,%u)\n", imageattr, type, enableFlag, colorMatrix,
153 grayMatrix, flags);
154
156 return InvalidParameter;
157
158 if (enableFlag)
159 {
160 if (!colorMatrix)
161 return InvalidParameter;
162
164 {
165 if (!grayMatrix)
166 return InvalidParameter;
167
168 imageattr->colormatrices[type].graymatrix = *grayMatrix;
169 }
170
171 imageattr->colormatrices[type].colormatrix = *colorMatrix;
172 imageattr->colormatrices[type].flags = flags;
173 }
174
175 imageattr->colormatrices[type].enabled = enableFlag;
176
177 return Ok;
178}
@ ColorMatrixFlagsAltGray
GLbitfield flags
Definition: glext.h:7161

Referenced by test_colormatrix(), and test_drawimage().

◆ GdipSetImageAttributesGamma()

GpStatus WINGDIPAPI GdipSetImageAttributesGamma ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag,
REAL  gamma 
)

Definition at line 208 of file imageattributes.c.

210{
211 TRACE("(%p,%u,%i,%0.2f)\n", imageAttr, type, enableFlag, gamma);
212
213 if (!imageAttr || (enableFlag && gamma <= 0.0) || type >= ColorAdjustTypeCount)
214 return InvalidParameter;
215
216 imageAttr->gamma_enabled[type] = enableFlag;
217 imageAttr->gamma[type] = gamma;
218
219 return Ok;
220}
REAL gamma[ColorAdjustTypeCount]
BOOL gamma_enabled[ColorAdjustTypeCount]

Referenced by GdipResetImageAttributes(), and test_gamma().

◆ GdipSetImageAttributesNoOp()

GpStatus WINGDIPAPI GdipSetImageAttributesNoOp ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag 
)

Definition at line 222 of file imageattributes.c.

224{
225 TRACE("(%p,%u,%i)\n", imageAttr, type, enableFlag);
226
228 return InvalidParameter;
229
230 imageAttr->noop[type] = enableFlag ? IMAGEATTR_NOOP_SET : IMAGEATTR_NOOP_CLEAR;
231
232 return Ok;
233}
@ IMAGEATTR_NOOP_CLEAR
@ IMAGEATTR_NOOP_SET

Referenced by test_colormatrix().

◆ GdipSetImageAttributesOutputChannel()

GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag,
ColorChannelFlags  channelFlags 
)

Definition at line 235 of file imageattributes.c.

237{
238 static int calls;
239
240 TRACE("(%p,%u,%i,%x)\n", imageAttr, type, enableFlag, channelFlags);
241
242 if(!(calls++))
243 FIXME("not implemented\n");
244
245 return NotImplemented;
246}

◆ GdipSetImageAttributesOutputChannelColorProfile()

GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag,
GDIPCONST WCHAR colorProfileFilename 
)

Definition at line 248 of file imageattributes.c.

251{
252 static int calls;
253
254 TRACE("(%p,%u,%i,%s)\n", imageAttr, type, enableFlag, debugstr_w(colorProfileFilename));
255
256 if(!(calls++))
257 FIXME("not implemented\n");
258
259 return NotImplemented;
260}
#define debugstr_w
Definition: kernel32.h:32

◆ GdipSetImageAttributesRemapTable()

GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag,
UINT  mapSize,
GDIPCONST ColorMap map 
)

Definition at line 262 of file imageattributes.c.

265{
266 ColorMap *new_map;
267
268 TRACE("(%p,%u,%i,%u,%p)\n", imageAttr, type, enableFlag, mapSize, map);
269
270 if(!imageAttr || type >= ColorAdjustTypeCount)
271 return InvalidParameter;
272
273 if (enableFlag)
274 {
275 if(!map || !mapSize)
276 return InvalidParameter;
277
278 new_map = malloc(sizeof(*map) * mapSize);
279
280 if (!new_map)
281 return OutOfMemory;
282
283 memcpy(new_map, map, sizeof(*map) * mapSize);
284
285 free(imageAttr->colorremaptables[type].colormap);
286
287 imageAttr->colorremaptables[type].mapsize = mapSize;
288 imageAttr->colorremaptables[type].colormap = new_map;
289 }
290 else
291 {
292 free(imageAttr->colorremaptables[type].colormap);
293 imageAttr->colorremaptables[type].colormap = NULL;
294 }
295
296 imageAttr->colorremaptables[type].enabled = enableFlag;
297
298 return Ok;
299}
Definition: _map.h:48

Referenced by GdipResetImageAttributes(), test_getadjustedpalette(), and test_remaptable().

◆ GdipSetImageAttributesThreshold()

GpStatus WINGDIPAPI GdipSetImageAttributesThreshold ( GpImageAttributes imageAttr,
ColorAdjustType  type,
BOOL  enableFlag,
REAL  threshold 
)

Definition at line 301 of file imageattributes.c.

303{
304 static int calls;
305
306 TRACE("(%p,%u,%i,%0.2f)\n", imageAttr, type, enableFlag, threshold);
307
308 if(!(calls++))
309 FIXME("not implemented\n");
310
311 return NotImplemented;
312}

◆ GdipSetImageAttributesToIdentity()

GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity ( GpImageAttributes imageAttr,
ColorAdjustType  type 
)

Definition at line 314 of file imageattributes.c.

316{
317 static int calls;
318
319 TRACE("(%p,%u)\n", imageAttr, type);
320
321 if(!(calls++))
322 FIXME("not implemented\n");
323
324 return NotImplemented;
325}

◆ GdipSetImageAttributesWrapMode()

GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode ( GpImageAttributes imageAttr,
WrapMode  wrap,
ARGB  argb,
BOOL  clamp 
)

Definition at line 180 of file imageattributes.c.

182{
183 TRACE("(%p,%u,%08lx,%i)\n", imageAttr, wrap, argb, clamp);
184
185 if(!imageAttr || wrap > WrapModeClamp)
186 return InvalidParameter;
187
188 imageAttr->wrap = wrap;
189 imageAttr->outside_color = argb;
190 imageAttr->clamp = clamp;
191
192 return Ok;
193}
#define wrap(journal, var)
Definition: recovery.c:207
GLenum clamp
Definition: glext.h:6216

Referenced by METAFILE_PlaybackObject(), and ZoomWnd_OnDraw().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( gdiplus  )