[PSDK] Update wmsdkidl.idl and import some of its related idl files from Wine Staging...
[reactos.git] / sdk / include / psdk / gdiplusgraphics.h
1 /*
2 * GdiPlusGraphics.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 _GDIPLUSGRAPHICS_H
20 #define _GDIPLUSGRAPHICS_H
21
22 class Image;
23 class ImageAttributes;
24 class CachedBitmap;
25 class Region;
26 class Font;
27 class GraphicsPath;
28 class Metafile;
29
30 class Graphics : public GdiplusBase
31 {
32 friend class Region;
33 friend class Font;
34 friend class Bitmap;
35 friend class CachedBitmap;
36
37 public:
38 Graphics(Image *image)
39 {
40 }
41
42 Graphics(HDC hdc)
43 {
44 GpGraphics *graphics = NULL;
45 status = DllExports::GdipCreateFromHDC(hdc, &graphics);
46 SetGraphics(graphics);
47 }
48
49 Graphics(HDC hdc, HANDLE hdevice)
50 {
51 }
52
53 Graphics(HWND hwnd, BOOL icm)
54 {
55 }
56
57 Status AddMetafileComment(const BYTE *data, UINT sizeData)
58 {
59 return SetStatus(DllExports::GdipComment(graphics, sizeData, data));
60 }
61
62 GraphicsContainer BeginContainer(VOID)
63 {
64 return GraphicsContainer();
65 }
66
67 GraphicsContainer BeginContainer(const RectF &dstrect, const RectF &srcrect, Unit unit)
68 {
69 return GraphicsContainer();
70 }
71
72 GraphicsContainer BeginContainer(const Rect &dstrect, const Rect &srcrect, Unit unit)
73 {
74 return GraphicsContainer();
75 }
76
77 Status Clear(const Color &color)
78 {
79 return SetStatus(DllExports::GdipGraphicsClear(graphics, color.GetValue()));
80 }
81
82 Status DrawArc(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
83 {
84 return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
85 }
86
87 Status DrawArc(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
88 {
89 return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
90 }
91
92 Status DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
93 {
94 return SetStatus(DllExports::GdipDrawArc(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle));
95 }
96
97 Status DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
98 {
99 return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle));
100 }
101
102 Status DrawBezier(const Pen *pen, const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
103 {
104 return SetStatus(DllExports::GdipDrawBezierI(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y));
105 }
106
107 Status DrawBezier(const Pen *pen, const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
108 {
109 return SetStatus(DllExports::GdipDrawBezier(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y));
110 }
111
112 Status DrawBezier(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
113 {
114 return SetStatus(DllExports::GdipDrawBezier(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2, x3, y3, x4, y4));
115 }
116
117 Status DrawBezier(const Pen *pen, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
118 {
119 return SetStatus(DllExports::GdipDrawBezierI(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2, x3, y3, x4, y4));
120 }
121
122 Status DrawBeziers(const Pen *pen, const Point *points, INT count)
123 {
124 return SetStatus(DllExports::GdipDrawBeziersI(graphics, pen ? pen->pen : NULL, points, count));
125 }
126
127 Status DrawBeziers(const Pen *pen, const PointF *points, INT count)
128 {
129 return SetStatus(DllExports::GdipDrawBeziers(graphics, pen ? pen->pen : NULL, points, count));
130 }
131
132 Status DrawCachedBitmap(CachedBitmap *cb, INT x, INT y)
133 {
134 return NotImplemented;
135 }
136
137 Status DrawClosedCurve(const Pen *pen, const Point *points, INT count)
138 {
139 return SetStatus(DllExports::GdipDrawClosedCurveI(graphics, pen ? pen->pen : NULL, points, count));
140 }
141
142 Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count)
143 {
144 return SetStatus(DllExports::GdipDrawClosedCurve(graphics, pen ? pen->pen : NULL, points, count));
145 }
146
147 Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
148 {
149 return SetStatus(DllExports::GdipDrawClosedCurve2(graphics, pen ? pen->pen : NULL, points, count, tension));
150 }
151
152 Status DrawClosedCurve(const Pen *pen, const Point *points, INT count, REAL tension)
153 {
154 return SetStatus(DllExports::GdipDrawClosedCurve2I(graphics, pen ? pen->pen : NULL, points, count, tension));
155 }
156
157 Status DrawCurve(const Pen *pen, const Point *points, INT count)
158 {
159 return SetStatus(DllExports::GdipDrawCurveI(graphics, pen ? pen->pen : NULL, points, count));
160 }
161
162 Status DrawCurve(const Pen *pen, const PointF *points, INT count)
163 {
164 return SetStatus(DllExports::GdipDrawCurve(graphics, pen ? pen->pen : NULL, points, count));
165 }
166
167 Status DrawCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
168 {
169 return SetStatus(DllExports::GdipDrawCurve2(graphics, pen ? pen->pen : NULL, points, count, tension));
170 }
171
172 Status DrawCurve(const Pen *pen, const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
173 {
174 return SetStatus(DllExports::GdipDrawCurve3I(graphics, pen ? pen->pen : NULL, points, count, offset, numberOfSegments, tension));
175 }
176
177 Status DrawCurve(const Pen *pen, const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
178 {
179 return SetStatus(DllExports::GdipDrawCurve3(graphics, pen ? pen->pen : NULL, points, count, offset, numberOfSegments, tension));
180 }
181
182 Status DrawCurve(const Pen *pen, const Point *points, INT count, REAL tension)
183 {
184 return SetStatus(DllExports::GdipDrawCurve2I(graphics, pen ? pen->pen : NULL, points, count, tension));
185 }
186
187 Status DrawDriverString(const UINT16 *text, INT length, const Font *font, const Brush *brush, const PointF *positions, INT flags, const Matrix *matrix)
188 {
189 return NotImplemented;
190 }
191
192 Status DrawEllipse(const Pen *pen, const Rect &rect)
193 {
194 return SetStatus(DllExports::GdipDrawEllipseI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height));
195 }
196
197 Status DrawEllipse(const Pen *pen, REAL x, REAL y, REAL width, REAL height)
198 {
199 return SetStatus(DllExports::GdipDrawEllipse(graphics, pen ? pen->pen : NULL, x, y, width, height));
200 }
201
202 Status DrawEllipse(const Pen *pen, const RectF &rect)
203 {
204 return SetStatus(DllExports::GdipDrawEllipse(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height));
205 }
206
207 Status DrawEllipse(const Pen *pen, INT x, INT y, INT width, INT height)
208 {
209 return SetStatus(DllExports::GdipDrawEllipseI(graphics, pen ? pen->pen : NULL, x, y, width, height));
210 }
211
212 Status DrawImage(Image *image, const Point *destPoints, INT count)
213 {
214 return NotImplemented;
215 }
216
217 Status DrawImage(Image *image, INT x, INT y)
218 {
219 return NotImplemented;
220 }
221
222 Status DrawImage(Image *image, const Point &point)
223 {
224 return NotImplemented;
225 }
226
227 Status DrawImage(Image *image, REAL x, REAL y)
228 {
229 return NotImplemented;
230 }
231
232 Status DrawImage(Image *image, const PointF &point)
233 {
234 return NotImplemented;
235 }
236
237 Status DrawImage(Image *image, const PointF *destPoints, INT count)
238 {
239 return NotImplemented;
240 }
241
242 Status DrawImage(Image *image, REAL x, REAL y, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit)
243 {
244 return NotImplemented;
245 }
246
247 Status DrawImage(Image *image, const RectF &rect)
248 {
249 return NotImplemented;
250 }
251
252 Status DrawImage(Image *image, INT x, INT y, INT width, INT height)
253 {
254 return NotImplemented;
255 }
256
257 Status DrawImage(Image *image, const PointF *destPoints, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit, ImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
258 {
259 return NotImplemented;
260 }
261
262 Status DrawImage(Image *image, const Rect &destRect, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit, ImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
263 {
264 return NotImplemented;
265 }
266
267 Status DrawImage(Image *image, const Point *destPoints, INT count, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit, ImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
268 {
269 return NotImplemented;
270 }
271
272 Status DrawImage(Image *image, REAL x, REAL y, REAL width, REAL height)
273 {
274 return NotImplemented;
275 }
276
277 Status DrawImage(Image *image, const Rect &rect)
278 {
279 return NotImplemented;
280 }
281
282 Status DrawImage(Image *image, INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit)
283 {
284 return NotImplemented;
285 }
286
287 Status DrawImage(Image *image, const RectF &destRect, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit, ImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
288 {
289 return NotImplemented;
290 }
291
292 Status DrawLine(const Pen *pen, const Point &pt1, const Point &pt2)
293 {
294 return SetStatus(DllExports::GdipDrawLineI(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y));
295 }
296
297 Status DrawLine(const Pen *pen, const PointF &pt1, const Point &pt2)
298 {
299 return SetStatus(DllExports::GdipDrawLine(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y));
300 }
301
302 Status DrawLine(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2)
303 {
304 return SetStatus(DllExports::GdipDrawLine(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2));
305 }
306
307 Status DrawLine(const Pen *pen, INT x1, INT y1, INT x2, INT y2)
308 {
309 return SetStatus(DllExports::GdipDrawLine(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2));
310 }
311
312 Status DrawLines(const Pen *pen, const Point *points, INT count)
313 {
314 return SetStatus(DllExports::GdipDrawLinesI(graphics, pen ? pen->pen : NULL, points, count));
315 }
316
317 Status DrawLines(const Pen *pen, const PointF *points, INT count)
318 {
319 return SetStatus(DllExports::GdipDrawLines(graphics, pen ? pen->pen : NULL, points, count));
320 }
321
322 Status DrawPath(const Pen *pen, const GraphicsPath *path)
323 {
324 return NotImplemented;
325 }
326
327 Status DrawPie(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
328 {
329 return SetStatus(DllExports::GdipDrawPieI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
330 }
331
332 Status DrawPie(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
333 {
334 return SetStatus(DllExports::GdipDrawPieI(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle));
335 }
336
337 Status DrawPie(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
338 {
339 return SetStatus(DllExports::GdipDrawPie(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle));
340 }
341
342 Status DrawPie(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
343 {
344 return SetStatus(DllExports::GdipDrawPie(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
345 }
346
347 Status DrawPolygon(const Pen *pen, const Point *points, INT count)
348 {
349 return SetStatus(DllExports::GdipDrawPolygonI(graphics, pen ? pen->pen : NULL, points, count));
350 }
351
352 Status DrawPolygon(const Pen *pen, const PointF *points, INT count)
353 {
354 return SetStatus(DllExports::GdipDrawPolygon(graphics, pen ? pen->pen : NULL, points, count));
355 }
356
357 Status DrawRectangle(const Pen *pen, const Rect &rect)
358 {
359 return SetStatus(DllExports::GdipDrawRectangleI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height));
360 }
361
362 Status DrawRectangle(const Pen *pen, INT x, INT y, INT width, INT height)
363 {
364 return SetStatus(DllExports::GdipDrawRectangleI(graphics, pen ? pen->pen : NULL, x, y, width, height));
365 }
366
367 Status DrawRectangle(const Pen *pen, REAL x, REAL y, REAL width, REAL height)
368 {
369 return SetStatus(DllExports::GdipDrawRectangle(graphics, pen ? pen->pen : NULL, x, y, width, height));
370 }
371
372 Status DrawRectangle(const Pen *pen, const RectF &rect)
373 {
374 return SetStatus(DllExports::GdipDrawRectangleI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height));
375 }
376
377 Status DrawRectangles(const Pen *pen, const Rect *rects, INT count)
378 {
379 return SetStatus(DllExports::GdipDrawRectanglesI(graphics, pen ? pen->pen : NULL, rects, count));
380 }
381
382 Status DrawRectangles(const Pen *pen, const RectF *rects, INT count)
383 {
384 return SetStatus(DllExports::GdipDrawRectangles(graphics, pen ? pen->pen : NULL, rects, count));
385 }
386
387 Status DrawString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, const Brush *brush)
388 {
389 return NotImplemented;
390 }
391
392 Status DrawString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const Brush *brush)
393 {
394 return NotImplemented;
395 }
396
397 Status DrawString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const StringFormat *stringFormat, const Brush *brush)
398 {
399 return NotImplemented;
400 }
401
402 Status EndContainer(GraphicsContainer state)
403 {
404 return SetStatus(DllExports::GdipEndContainer(graphics, state));
405 }
406
407 Status EnumerateMetafile(const Metafile *metafile, const Metafile &destPoint, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
408 {
409 return NotImplemented;
410 }
411
412 Status EnumerateMetafile(const Metafile *metafile, const Point *destPoints, INT count, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
413 {
414 return NotImplemented;
415 }
416
417 Status EnumerateMetafile(const Metafile *metafile, const Point &destPoint, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
418 {
419 return NotImplemented;
420 }
421
422 Status EnumerateMetafile(const Metafile *metafile, const PointF *destPoints, INT count, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
423 {
424 return NotImplemented;
425 }
426
427 Status EnumerateMetafile(const Metafile *metafile, const Rect &destRect, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
428 {
429 return NotImplemented;
430 }
431
432 Status EnumerateMetafile(const Metafile *metafile, const RectF &destRect, const RectF &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
433 {
434 return NotImplemented;
435 }
436
437 Status EnumerateMetafile(const Metafile *metafile, const RectF &destRect, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
438 {
439 return NotImplemented;
440 }
441
442 Status EnumerateMetafile(const Metafile *metafile, const PointF &destPoint, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
443 {
444 return NotImplemented;
445 }
446
447 Status EnumerateMetafile(const Metafile *metafile, const Point *destPoints, INT count, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
448 {
449 return NotImplemented;
450 }
451
452 Status EnumerateMetafile(const Metafile *metafile, const Rect &destRect, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
453 {
454 return NotImplemented;
455 }
456
457 Status EnumerateMetafile(const Metafile *metafile, const Point *destPoints, INT count, const RectF &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
458 {
459 return NotImplemented;
460 }
461
462 Status EnumerateMetafile(const Metafile *metafile, const PointF &destPoint, EnumerateMetafileProc callback, VOID *callbackData, ImageAttributes *imageAttributes)
463 {
464 return NotImplemented;
465 }
466
467 Status ExcludeClip(const Rect& rect)
468 {
469 return NotImplemented;
470 }
471
472 Status ExcludeClip(const RectF &rect)
473 {
474 return NotImplemented;
475 }
476
477 Status ExcludeClip(const Region *region)
478 {
479 return NotImplemented;
480 }
481
482 Status FillClosedCurve(const Brush *brush, const Point *points, INT count)
483 {
484 return SetStatus(DllExports::GdipFillClosedCurveI(graphics, brush ? brush->brush : NULL, points, count));
485 }
486
487 Status FillClosedCurve(const Brush *brush, const Point *points, INT count, FillMode fillMode, REAL tension)
488 {
489 return SetStatus(DllExports::GdipFillClosedCurve2I(graphics, brush ? brush->brush : NULL, points, count, tension, fillMode));
490 }
491
492 Status FillClosedCurve(const Brush *brush, const PointF *points, INT count)
493 {
494 return SetStatus(DllExports::GdipFillClosedCurve(graphics, brush ? brush->brush : NULL, points, count));
495 }
496
497 Status FillClosedCurve(const Brush *brush, const PointF *points, INT count, FillMode fillMode, REAL tension)
498 {
499 return SetStatus(DllExports::GdipFillClosedCurve2(graphics, brush ? brush->brush : NULL, points, count, tension, fillMode));
500 }
501
502 Status FillEllipse(const Brush *brush, const Rect &rect)
503 {
504 return SetStatus(DllExports::GdipFillEllipseI(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
505 }
506
507 Status FillEllipse(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
508 {
509 return SetStatus(DllExports::GdipFillEllipse(graphics, brush ? brush->brush : NULL, x, y, width, height));
510 }
511
512 Status FillEllipse(const Brush *brush, const RectF &rect)
513 {
514 return SetStatus(DllExports::GdipFillEllipse(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
515 }
516
517 Status FillEllipse(const Brush *brush, INT x, INT y, INT width, INT height)
518 {
519 return SetStatus(DllExports::GdipFillEllipseI(graphics, brush ? brush->brush : NULL, x, y, width, height));
520 }
521
522 Status FillPath(const Brush *brush, const GraphicsPath *path)
523 {
524 return NotImplemented;
525 }
526
527 Status FillPie(const Brush *brush, const Rect &rect, REAL startAngle, REAL sweepAngle)
528 {
529 return SetStatus(DllExports::GdipFillPieI(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
530 }
531
532 Status FillPie(const Brush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
533 {
534 return SetStatus(DllExports::GdipFillPieI(graphics, brush ? brush->brush : NULL, x, y, width, height, startAngle, sweepAngle));
535 }
536
537 Status FillPie(const Brush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
538 {
539 return SetStatus(DllExports::GdipFillPie(graphics, brush ? brush->brush : NULL, x, y, width, height, startAngle, sweepAngle));
540 }
541
542 Status FillPie(const Brush *brush, RectF &rect, REAL startAngle, REAL sweepAngle)
543 {
544 return SetStatus(DllExports::GdipFillPie(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
545 }
546
547 Status FillPolygon(const Brush *brush, const Point *points, INT count)
548 {
549 return SetStatus(DllExports::GdipFillPolygon2I(graphics, brush ? brush->brush : NULL, points, count));
550 }
551
552 Status FillPolygon(const Brush *brush, const PointF *points, INT count)
553 {
554 return SetStatus(DllExports::GdipFillPolygon2(graphics, brush ? brush->brush : NULL, points, count));
555 }
556
557 Status FillPolygon(const Brush *brush, const Point *points, INT count, FillMode fillMode)
558 {
559 return SetStatus(DllExports::GdipFillPolygonI(graphics, brush ? brush->brush : NULL, points, count, fillMode));
560 }
561
562 Status FillPolygon(const Brush *brush, const PointF *points, INT count, FillMode fillMode)
563 {
564 return SetStatus(DllExports::GdipFillPolygon(graphics, brush ? brush->brush : NULL, points, count, fillMode));
565 }
566
567 Status FillRectangle(const Brush *brush, const Rect &rect)
568 {
569 return SetStatus(DllExports::GdipFillRectangleI(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
570 }
571
572 Status FillRectangle(const Brush *brush, const RectF &rect)
573 {
574 return SetStatus(DllExports::GdipFillRectangle(graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
575 }
576
577 Status FillRectangle(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
578 {
579 return SetStatus(DllExports::GdipFillRectangle(graphics, brush ? brush->brush : NULL, x, y, width, height));
580 }
581
582 Status FillRectangle(const Brush *brush, INT x, INT y, INT width, INT height)
583 {
584 return SetStatus(DllExports::GdipFillRectangleI(graphics, brush ? brush->brush : NULL, x, y, width, height));
585 }
586
587 Status FillRectangles(const Brush *brush, const Rect *rects, INT count)
588 {
589 return SetStatus(DllExports::GdipFillRectanglesI(graphics, brush ? brush->brush : NULL, rects, count));
590 }
591
592 Status FillRectangles(const Brush *brush, const RectF *rects, INT count)
593 {
594 return SetStatus(DllExports::GdipFillRectangles(graphics, brush ? brush->brush : NULL, rects, count));
595 }
596
597 Status FillRegion(const Brush *brush, const Region *region)
598 {
599 return NotImplemented;
600 }
601
602 VOID Flush(FlushIntention intention)
603 {
604 }
605
606 static Graphics *FromHDC(HDC hdc)
607 {
608 return NULL;
609 }
610
611 static Graphics *FromHDC(HDC hdc, HANDLE hDevice)
612 {
613 return NULL;
614 }
615
616 static Graphics *FromHWND(HWND hWnd, BOOL icm)
617 {
618 return NULL;
619 }
620
621 static Graphics *FromImage(Image *image)
622 {
623 return NULL;
624 }
625
626 Status GetClip(Region *region) const
627 {
628 return NotImplemented;
629 }
630
631 Status GetClipBounds(Rect* rect) const
632 {
633 return SetStatus(DllExports::GdipGetClipBoundsI(graphics, rect));
634 }
635
636 Status GetClipBounds(RectF* rect) const
637 {
638 return SetStatus(DllExports::GdipGetClipBounds(graphics, rect));
639 }
640
641 CompositingMode GetCompositingMode(VOID)
642 {
643 CompositingMode compositingMode;
644 SetStatus(DllExports::GdipGetCompositingMode(graphics, &compositingMode));
645 return compositingMode;
646 }
647
648 CompositingQuality GetCompositingQuality(VOID)
649 {
650 CompositingQuality compositingQuality;
651 SetStatus(DllExports::GdipGetCompositingQuality(graphics, &compositingQuality));
652 return compositingQuality;
653 }
654
655 REAL GetDpiX(VOID)
656 {
657 REAL dpi;
658 SetStatus(DllExports::GdipGetDpiX(graphics, &dpi));
659 return dpi;
660 }
661
662 REAL GetDpiY(VOID)
663 {
664 REAL dpi;
665 SetStatus(DllExports::GdipGetDpiY(graphics, &dpi));
666 return dpi;
667 }
668
669 static HPALETTE GetHalftonePalette(VOID)
670 {
671 return NULL;
672 }
673
674 HDC GetHDC(VOID)
675 {
676 return NULL;
677 }
678
679 InterpolationMode GetInterpolationMode(VOID)
680 {
681 InterpolationMode interpolationMode;
682 SetStatus(DllExports::GdipGetInterpolationMode(graphics, &interpolationMode));
683 return interpolationMode;
684 }
685
686 Status GetLastStatus(VOID)
687 {
688 return status;
689 }
690
691 Status GetNearestColor(Color* color) const
692 {
693 return NotImplemented;
694 }
695
696 REAL GetPageScale(VOID)
697 {
698 REAL scale;
699 SetStatus(DllExports::GdipGetPageScale(graphics, &scale));
700 return scale;
701 }
702
703 Unit GetPageUnit(VOID)
704 {
705 Unit unit;
706 SetStatus(DllExports::GdipGetPageUnit(graphics, &unit));
707 return unit;
708 }
709
710 PixelOffsetMode GetPixelOffsetMode(VOID)
711 {
712 PixelOffsetMode pixelOffsetMode;
713 SetStatus(DllExports::GdipGetPixelOffsetMode(graphics, &pixelOffsetMode));
714 return pixelOffsetMode;
715 }
716
717 Status GetRenderingOrigin(INT *x, INT *y)
718 {
719 return NotImplemented; // FIXME: not available: SetStatus(DllExports::GdipGetRenderingOrigin(graphics, x, y));
720 }
721
722 SmoothingMode GetSmoothingMode(VOID) const
723 {
724 SmoothingMode smoothingMode;
725 SetStatus(DllExports::GdipGetSmoothingMode(graphics, &smoothingMode));
726 return smoothingMode;
727 }
728
729 UINT GetTextContrast(VOID) const
730 {
731 UINT contrast;
732 SetStatus(DllExports::GdipGetTextContrast(graphics, &contrast));
733 return contrast;
734 }
735
736 TextRenderingHint GetTextRenderingHint(VOID) const
737 {
738 TextRenderingHint mode;
739 SetStatus(DllExports::GdipGetTextRenderingHint(graphics, &mode));
740 return mode;
741 }
742
743 Status GetTransform(Matrix* matrix)
744 {
745 return NotImplemented;
746 }
747
748 Status GetVisibleClipBounds(Rect* rect) const
749 {
750 return SetStatus(DllExports::GdipGetVisibleClipBoundsI(graphics, rect));
751 }
752
753 Status GetVisibleClipBounds(RectF* rect) const
754 {
755 return SetStatus(DllExports::GdipGetVisibleClipBounds(graphics, rect));
756 }
757
758 Status IntersectClip(const Rect& rect)
759 {
760 return NotImplemented;
761 }
762
763 Status IntersectClip(const Region* region)
764 {
765 return NotImplemented;
766 }
767
768 Status IntersectClip(const RectF& rect)
769 {
770 return NotImplemented;
771 }
772
773 BOOL IsClipEmpty(VOID) const
774 {
775 BOOL result;
776 SetStatus(DllExports::GdipIsClipEmpty(graphics, &result));
777 return result;
778 }
779
780 BOOL IsVisible(const Point& point) const
781 {
782 BOOL result;
783 SetStatus(DllExports::GdipIsVisiblePointI(graphics, point.X, point.Y, &result));
784 return result;
785 }
786
787 BOOL IsVisible(const Rect& rect) const
788 {
789 BOOL result;
790 SetStatus(DllExports::GdipIsVisibleRectI(graphics, rect.X, rect.Y, rect.Width, rect.Height, &result));
791 return result;
792 }
793
794 BOOL IsVisible(REAL x, REAL y) const
795 {
796 BOOL result;
797 SetStatus(DllExports::GdipIsVisiblePoint(graphics, x, y, &result));
798 return result;
799 }
800
801 BOOL IsVisible(const RectF& rect) const
802 {
803 BOOL result;
804 SetStatus(DllExports::GdipIsVisibleRect(graphics, rect.X, rect.Y, rect.Width, rect.Height, &result));
805 return result;
806 }
807
808 BOOL IsVisible(INT x, INT y, INT width, INT height) const
809 {
810 BOOL result;
811 SetStatus(DllExports::GdipIsVisibleRectI(graphics, x, y, width, height, &result));
812 return result;
813 }
814
815 BOOL IsVisible(INT x, INT y) const
816 {
817 BOOL result;
818 SetStatus(DllExports::GdipIsVisiblePointI(graphics, x, y, &result));
819 return result;
820 }
821
822 BOOL IsVisible(const PointF& point) const
823 {
824 BOOL result;
825 SetStatus(DllExports::GdipIsVisiblePoint(graphics, point.X, point.Y, &result));
826 return result;
827 }
828
829 BOOL IsVisible(REAL x, REAL y, REAL width, REAL height) const
830 {
831 BOOL result;
832 SetStatus(DllExports::GdipIsVisibleRect(graphics, x, y, width, height, &result));
833 return result;
834 }
835
836 BOOL IsVisibleClipEmpty(VOID) const
837 {
838 return FALSE; /* FIXME: not available:
839 BOOL result;
840 SetStatus(DllExports::GdipIsVisibleClipEmpty(graphics, &result));
841 return result;*/
842 }
843
844 Status MeasureCharacterRanges(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, INT regionCount, Region *regions) const
845 {
846 return NotImplemented;
847 }
848
849 Status MeasureDriverString(const UINT16 *text, INT length, const Font *font, const PointF *positions, INT flags, const Matrix *matrix, RectF *boundingBox) const
850 {
851 return NotImplemented;
852 }
853
854 Status MeasureString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, RectF *boundingBox) const
855 {
856 return NotImplemented;
857 }
858
859 Status MeasureString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const StringFormat *stringFormat, RectF *boundingBox) const
860 {
861 return NotImplemented;
862 }
863
864 Status MeasureString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, RectF *boundingBox, INT *codepointsFitted, INT *linesFilled) const
865 {
866 return NotImplemented;
867 }
868
869 Status MeasureString(const WCHAR *string, INT length, const Font *font, const SizeF &layoutRectSize, const StringFormat *stringFormat, SizeF *size, INT *codepointsFitted, INT *linesFilled) const
870 {
871 return NotImplemented;
872 }
873
874 Status MeasureString(const WCHAR *string, INT length, const Font *font, const PointF &origin, RectF *boundingBox) const
875 {
876 return NotImplemented;
877 }
878
879 Status MultiplyTransform(Matrix *matrix, MatrixOrder order)
880 {
881 return NotImplemented;
882 }
883
884 VOID ReleaseHDC(HDC hdc)
885 {
886 }
887
888 Status ResetClip(VOID)
889 {
890 return SetStatus(DllExports::GdipResetClip(graphics));
891 }
892
893 Status ResetTransform(VOID)
894 {
895 return SetStatus(DllExports::GdipResetWorldTransform(graphics));
896 }
897
898 Status Restore(GraphicsState gstate)
899 {
900 return NotImplemented;
901 }
902
903 Status RotateTransform(REAL angle, MatrixOrder order)
904 {
905 return SetStatus(DllExports::GdipRotateWorldTransform(graphics, angle, order));
906 }
907
908 GraphicsState Save(VOID)
909 {
910 return 0;
911 }
912
913 Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order)
914 {
915 return SetStatus(DllExports::GdipScaleWorldTransform(graphics, sx, sy, order));
916 }
917
918 Status SetClip(const Graphics *g, CombineMode combineMode)
919 {
920 return SetStatus(DllExports::GdipSetClipGraphics(graphics, g ? g->graphics : NULL, combineMode));
921 }
922
923 Status SetClip(const GraphicsPath *path, CombineMode combineMode)
924 {
925 return NotImplemented;
926 }
927
928 Status SetClip(const Region *region, CombineMode combineMode)
929 {
930 return NotImplemented;
931 }
932
933 Status SetClip(const Rect &rect, CombineMode combineMode)
934 {
935 return SetStatus(DllExports::GdipSetClipRectI(graphics, rect.X, rect.Y, rect.Width, rect.Height, combineMode));
936 }
937
938 Status SetClip(HRGN hRgn, CombineMode combineMode)
939 {
940 return SetStatus(DllExports::GdipSetClipHrgn(graphics, hRgn, combineMode));
941 }
942
943 Status SetClip(const RectF& rect, CombineMode combineMode)
944 {
945 return SetStatus(DllExports::GdipSetClipRect(graphics, rect.X, rect.Y, rect.Width, rect.Height, combineMode));
946 }
947
948 Status SetCompositingMode(CompositingMode compositingMode)
949 {
950 return SetStatus(DllExports::GdipSetCompositingMode(graphics, compositingMode));
951 }
952
953 Status SetCompositingQuality(CompositingQuality compositingQuality)
954 {
955 return SetStatus(DllExports::GdipSetCompositingQuality(graphics, compositingQuality));
956 }
957
958 Status SetInterpolationMode(InterpolationMode interpolationMode)
959 {
960 return SetStatus(DllExports::GdipSetInterpolationMode(graphics, interpolationMode));
961 }
962
963 Status SetPageScale(REAL scale)
964 {
965 return SetStatus(DllExports::GdipSetPageScale(graphics, scale));
966 }
967
968 Status SetPageUnit(Unit unit)
969 {
970 return SetStatus(DllExports::GdipSetPageUnit(graphics, unit));
971 }
972
973 Status SetPixelOffsetMode(PixelOffsetMode pixelOffsetMode)
974 {
975 return SetStatus(DllExports::GdipSetPixelOffsetMode(graphics, pixelOffsetMode));
976 }
977
978 Status SetRenderingOrigin(INT x, INT y)
979 {
980 return SetStatus(DllExports::GdipSetRenderingOrigin(graphics, x, y));
981 }
982
983 Status SetSmoothingMode(SmoothingMode smoothingMode)
984 {
985 return SetStatus(DllExports::GdipSetSmoothingMode(graphics, smoothingMode));
986 }
987
988 Status SetTextContrast(UINT contrast)
989 {
990 return SetStatus(DllExports::GdipSetTextContrast(graphics, contrast));
991 }
992
993 Status SetTextRenderingHint(TextRenderingHint newMode)
994 {
995 return SetStatus(DllExports::GdipSetTextRenderingHint(graphics, newMode));
996 }
997
998 Status SetTransform(const Matrix *matrix)
999 {
1000 return NotImplemented;
1001 }
1002
1003 Status TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, Point *pts, INT count)
1004 {
1005 return SetStatus(DllExports::GdipTransformPointsI(graphics, destSpace, srcSpace, pts, count));
1006 }
1007
1008 Status TranslateClip(INT dx, INT dy)
1009 {
1010 return SetStatus(DllExports::GdipTranslateClipI(graphics, dx, dy));
1011 }
1012
1013 Status TranslateClip(REAL dx, REAL dy)
1014 {
1015 return SetStatus(DllExports::GdipTranslateClip(graphics, dx, dy));
1016 }
1017
1018 Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order)
1019 {
1020 return SetStatus(DllExports::GdipTranslateWorldTransform(graphics, dx, dy, order));
1021 }
1022
1023 private:
1024 Status SetStatus(Status status) const
1025 {
1026 if (status == Ok)
1027 return status;
1028 this->status = status;
1029 return status;
1030 }
1031
1032 VOID SetGraphics(GpGraphics *graphics)
1033 {
1034 this->graphics = graphics;
1035 }
1036
1037 private:
1038 mutable Status status;
1039 GpGraphics *graphics;
1040 };
1041
1042 #endif /* _GDIPLUSGRAPHICS_H */