ReactOS 0.4.15-dev-7942-gd23573b
gdiplusgraphics.h
Go to the documentation of this file.
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
22class Graphics : public GdiplusBase
23{
24 friend class Region;
25 friend class Font;
26 friend class Bitmap;
27 friend class CachedBitmap;
28 friend class ImageAttributes;
29
30 public:
32 {
33 GpGraphics *graphics = NULL;
34 if (image)
35 {
36 lastStatus = DllExports::GdipGetImageGraphicsContext(getNat(image), &graphics);
37 }
38 SetNativeGraphics(graphics);
39 }
40
42 {
43 GpGraphics *graphics = NULL;
44 lastStatus = DllExports::GdipCreateFromHDC(hdc, &graphics);
45 SetNativeGraphics(graphics);
46 }
47
49 {
50 GpGraphics *graphics = NULL;
51 lastStatus = DllExports::GdipCreateFromHDC2(hdc, hdevice, &graphics);
52 SetNativeGraphics(graphics);
53 }
54
56 {
57 GpGraphics *graphics = NULL;
58 if (icm)
59 {
60 lastStatus = DllExports::GdipCreateFromHWNDICM(hwnd, &graphics);
61 }
62 else
63 {
64 lastStatus = DllExports::GdipCreateFromHWND(hwnd, &graphics);
65 }
66 SetNativeGraphics(graphics);
67 }
68
70 {
71 DllExports::GdipDeleteGraphics(nativeGraphics);
72 }
73
74 Status
75 AddMetafileComment(const BYTE *data, UINT sizeData)
76 {
77 return SetStatus(DllExports::GdipComment(nativeGraphics, sizeData, data));
78 }
79
82 {
83 return GraphicsContainer();
84 }
85
87 BeginContainer(const RectF &dstrect, const RectF &srcrect, Unit unit)
88 {
89 return GraphicsContainer();
90 }
91
93 BeginContainer(const Rect &dstrect, const Rect &srcrect, Unit unit)
94 {
95 return GraphicsContainer();
96 }
97
98 Status
100 {
101 return SetStatus(DllExports::GdipGraphicsClear(nativeGraphics, color.GetValue()));
102 }
103
104 Status
105 DrawArc(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
106 {
107 return SetStatus(DllExports::GdipDrawArcI(
108 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
109 }
110
111 Status
112 DrawArc(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
113 {
114 return SetStatus(DllExports::GdipDrawArcI(
115 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
116 }
117
118 Status
119 DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
120 {
121 return SetStatus(DllExports::GdipDrawArc(
122 nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height, startAngle, sweepAngle));
123 }
124
125 Status
126 DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
127 {
128 return SetStatus(DllExports::GdipDrawArcI(
129 nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height, startAngle, sweepAngle));
130 }
131
132 Status
133 DrawBezier(const Pen *pen, const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
134 {
135 return SetStatus(DllExports::GdipDrawBezierI(
136 nativeGraphics, pen ? getNat(pen) : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y));
137 }
138
139 Status
140 DrawBezier(const Pen *pen, const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
141 {
142 return SetStatus(DllExports::GdipDrawBezier(
143 nativeGraphics, pen ? getNat(pen) : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y));
144 }
145
146 Status
147 DrawBezier(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
148 {
149 return SetStatus(
150 DllExports::GdipDrawBezier(nativeGraphics, pen ? getNat(pen) : NULL, x1, y1, x2, y2, x3, y3, x4, y4));
151 }
152
153 Status
154 DrawBezier(const Pen *pen, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
155 {
156 return SetStatus(
157 DllExports::GdipDrawBezierI(nativeGraphics, pen ? getNat(pen) : NULL, x1, y1, x2, y2, x3, y3, x4, y4));
158 }
159
160 Status
161 DrawBeziers(const Pen *pen, const Point *points, INT count)
162 {
163 return SetStatus(DllExports::GdipDrawBeziersI(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
164 }
165
166 Status
167 DrawBeziers(const Pen *pen, const PointF *points, INT count)
168 {
169 return SetStatus(DllExports::GdipDrawBeziers(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
170 }
171
172 Status
174 {
175 return SetStatus(DllExports::GdipDrawCachedBitmap(nativeGraphics, getNat(cb), x, y));
176 }
177
178 Status
180 {
181 return SetStatus(DllExports::GdipDrawClosedCurveI(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
182 }
183
184 Status
186 {
187 return SetStatus(DllExports::GdipDrawClosedCurve(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
188 }
189
190 Status
191 DrawClosedCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
192 {
193 return SetStatus(
194 DllExports::GdipDrawClosedCurve2(nativeGraphics, pen ? getNat(pen) : NULL, points, count, tension));
195 }
196
197 Status
198 DrawClosedCurve(const Pen *pen, const Point *points, INT count, REAL tension)
199 {
200 return SetStatus(
201 DllExports::GdipDrawClosedCurve2I(nativeGraphics, pen ? getNat(pen) : NULL, points, count, tension));
202 }
203
204 Status
205 DrawCurve(const Pen *pen, const Point *points, INT count)
206 {
207 return SetStatus(DllExports::GdipDrawCurveI(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
208 }
209
210 Status
211 DrawCurve(const Pen *pen, const PointF *points, INT count)
212 {
213 return SetStatus(DllExports::GdipDrawCurve(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
214 }
215
216 Status
217 DrawCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
218 {
219 return SetStatus(DllExports::GdipDrawCurve2(nativeGraphics, pen ? getNat(pen) : NULL, points, count, tension));
220 }
221
222 Status
223 DrawCurve(const Pen *pen, const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
224 {
225 return SetStatus(DllExports::GdipDrawCurve3I(
226 nativeGraphics, pen ? getNat(pen) : NULL, points, count, offset, numberOfSegments, tension));
227 }
228
229 Status
230 DrawCurve(const Pen *pen, const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
231 {
232 return SetStatus(DllExports::GdipDrawCurve3(
233 nativeGraphics, pen ? getNat(pen) : NULL, points, count, offset, numberOfSegments, tension));
234 }
235
236 Status
237 DrawCurve(const Pen *pen, const Point *points, INT count, REAL tension)
238 {
239 return SetStatus(DllExports::GdipDrawCurve2I(nativeGraphics, pen ? getNat(pen) : NULL, points, count, tension));
240 }
241
242 Status
244 const UINT16 *text,
245 INT length,
246 const Font *font,
247 const Brush *brush,
248 const PointF *positions,
249 INT flags,
250 const Matrix *matrix)
251 {
252 return SetStatus(DllExports::GdipDrawDriverString(
253 nativeGraphics, text, length, font ? getNat(font) : NULL, brush ? getNat(brush) : NULL, positions, flags,
254 matrix ? getNat(matrix) : NULL));
255 }
256
257 Status
258 DrawEllipse(const Pen *pen, const Rect &rect)
259 {
260 return SetStatus(DllExports::GdipDrawEllipseI(
261 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
262 }
263
264 Status
266 {
267 return SetStatus(DllExports::GdipDrawEllipse(nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height));
268 }
269
270 Status
271 DrawEllipse(const Pen *pen, const RectF &rect)
272 {
273 return SetStatus(DllExports::GdipDrawEllipse(
274 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
275 }
276
277 Status
279 {
280 return SetStatus(DllExports::GdipDrawEllipseI(nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height));
281 }
282
283 Status
284 DrawImage(Image *image, const Point *destPoints, INT count)
285 {
286 if (count != 3 && count != 4)
288
289 return SetStatus(
290 DllExports::GdipDrawImagePointsI(nativeGraphics, image ? getNat(image) : NULL, destPoints, count));
291 }
292
293 Status
295 {
296 return SetStatus(DllExports::GdipDrawImageI(nativeGraphics, image ? getNat(image) : NULL, x, y));
297 }
298
299 Status
301 {
302 return DrawImage(image, point.X, point.Y);
303 }
304
305 Status
307 {
308 return SetStatus(DllExports::GdipDrawImage(nativeGraphics, image ? getNat(image) : NULL, x, y));
309 }
310
311 Status
313 {
314 return DrawImage(image, point.X, point.Y);
315 }
316
317 Status
318 DrawImage(Image *image, const PointF *destPoints, INT count)
319 {
320 if (count != 3 && count != 4)
322
323 return SetStatus(
324 DllExports::GdipDrawImagePoints(nativeGraphics, image ? getNat(image) : NULL, destPoints, count));
325 }
326
327 Status
328 DrawImage(Image *image, REAL x, REAL y, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit)
329 {
330 return SetStatus(DllExports::GdipDrawImagePointRect(
331 nativeGraphics, image ? getNat(image) : NULL, x, y, srcx, srcy, srcwidth, srcheight, srcUnit));
332 }
333
334 Status
336 {
337 return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
338 }
339
340 Status
342 {
343 return SetStatus(
344 DllExports::GdipDrawImageRectI(nativeGraphics, image ? getNat(image) : NULL, x, y, width, height));
345 }
346
347 Status
349 Image *image,
350 const PointF *destPoints,
351 INT count,
352 REAL srcx,
353 REAL srcy,
354 REAL srcwidth,
355 REAL srcheight,
356 Unit srcUnit,
357 ImageAttributes *imageAttributes,
359 VOID *callbackData)
360 {
361 return SetStatus(DllExports::GdipDrawImagePointsRect(
362 nativeGraphics, image ? getNat(image) : NULL, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit,
363 imageAttributes ? getNat(imageAttributes) : NULL, callback, callbackData));
364 }
365
366 Status
368 Image *image,
369 const Rect &destRect,
370 INT srcx,
371 INT srcy,
372 INT srcwidth,
373 INT srcheight,
374 Unit srcUnit,
375 const ImageAttributes *imageAttributes = NULL,
377 VOID *callbackData = NULL)
378 {
379 return SetStatus(DllExports::GdipDrawImageRectRectI(
380 nativeGraphics, image ? getNat(image) : NULL, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcx,
381 srcy, srcwidth, srcheight, srcUnit, imageAttributes ? getNat(imageAttributes) : NULL, callback,
382 callbackData));
383 }
384
385 Status
387 Image *image,
388 const Point *destPoints,
389 INT count,
390 INT srcx,
391 INT srcy,
392 INT srcwidth,
393 INT srcheight,
394 Unit srcUnit,
395 ImageAttributes *imageAttributes = NULL,
397 VOID *callbackData = NULL)
398 {
399 return SetStatus(DllExports::GdipDrawImagePointsRectI(
400 nativeGraphics, image ? getNat(image) : NULL, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit,
401 imageAttributes ? getNat(imageAttributes) : NULL, callback, callbackData));
402 }
403
404 Status
406 {
407 return SetStatus(
408 DllExports::GdipDrawImageRect(nativeGraphics, image ? getNat(image) : NULL, x, y, width, height));
409 }
410
411 Status
413 {
414 return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
415 }
416
417 Status
418 DrawImage(Image *image, INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit)
419 {
420 return SetStatus(DllExports::GdipDrawImagePointRectI(
421 nativeGraphics, image ? getNat(image) : NULL, x, y, srcx, srcy, srcwidth, srcheight, srcUnit));
422 }
423
424 Status
426 Image *image,
427 const RectF &destRect,
428 REAL srcx,
429 REAL srcy,
430 REAL srcwidth,
431 REAL srcheight,
432 Unit srcUnit,
433 ImageAttributes *imageAttributes = NULL,
435 VOID *callbackData = NULL)
436 {
437 return SetStatus(DllExports::GdipDrawImageRectRect(
438 nativeGraphics, image ? getNat(image) : NULL, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcx,
439 srcy, srcwidth, srcheight, srcUnit, imageAttributes ? getNat(imageAttributes) : NULL, callback,
440 callbackData));
441 }
442
443 Status
444 DrawLine(const Pen *pen, const Point &pt1, const Point &pt2)
445 {
446 return SetStatus(
447 DllExports::GdipDrawLineI(nativeGraphics, pen ? getNat(pen) : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y));
448 }
449
450 Status
451 DrawLine(const Pen *pen, const PointF &pt1, const Point &pt2)
452 {
453 return SetStatus(
454 DllExports::GdipDrawLine(nativeGraphics, pen ? getNat(pen) : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y));
455 }
456
457 Status
458 DrawLine(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2)
459 {
460 return SetStatus(DllExports::GdipDrawLine(nativeGraphics, pen ? getNat(pen) : NULL, x1, y1, x2, y2));
461 }
462
463 Status
464 DrawLine(const Pen *pen, INT x1, INT y1, INT x2, INT y2)
465 {
466 return SetStatus(DllExports::GdipDrawLine(nativeGraphics, pen ? getNat(pen) : NULL, x1, y1, x2, y2));
467 }
468
469 Status
470 DrawLines(const Pen *pen, const Point *points, INT count)
471 {
472 return SetStatus(DllExports::GdipDrawLinesI(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
473 }
474
475 Status
476 DrawLines(const Pen *pen, const PointF *points, INT count)
477 {
478 return SetStatus(DllExports::GdipDrawLines(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
479 }
480
481 Status
482 DrawPath(const Pen *pen, const GraphicsPath *path)
483 {
484 return SetStatus(
485 DllExports::GdipDrawPath(nativeGraphics, pen ? getNat(pen) : NULL, path ? getNat(path) : NULL));
486 }
487
488 Status
489 DrawPie(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
490 {
491 return SetStatus(DllExports::GdipDrawPieI(
492 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
493 }
494
495 Status
496 DrawPie(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
497 {
498 return SetStatus(DllExports::GdipDrawPieI(
499 nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height, startAngle, sweepAngle));
500 }
501
502 Status
503 DrawPie(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
504 {
505 return SetStatus(DllExports::GdipDrawPie(
506 nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height, startAngle, sweepAngle));
507 }
508
509 Status
510 DrawPie(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
511 {
512 return SetStatus(DllExports::GdipDrawPie(
513 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle));
514 }
515
516 Status
517 DrawPolygon(const Pen *pen, const Point *points, INT count)
518 {
519 return SetStatus(DllExports::GdipDrawPolygonI(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
520 }
521
522 Status
523 DrawPolygon(const Pen *pen, const PointF *points, INT count)
524 {
525 return SetStatus(DllExports::GdipDrawPolygon(nativeGraphics, pen ? getNat(pen) : NULL, points, count));
526 }
527
528 Status
529 DrawRectangle(const Pen *pen, const Rect &rect)
530 {
531 return SetStatus(DllExports::GdipDrawRectangleI(
532 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
533 }
534
535 Status
537 {
538 return SetStatus(DllExports::GdipDrawRectangleI(nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height));
539 }
540
541 Status
543 {
544 return SetStatus(DllExports::GdipDrawRectangle(nativeGraphics, pen ? getNat(pen) : NULL, x, y, width, height));
545 }
546
547 Status
548 DrawRectangle(const Pen *pen, const RectF &rect)
549 {
550 return SetStatus(DllExports::GdipDrawRectangleI(
551 nativeGraphics, pen ? getNat(pen) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
552 }
553
554 Status
555 DrawRectangles(const Pen *pen, const Rect *rects, INT count)
556 {
557 return SetStatus(DllExports::GdipDrawRectanglesI(nativeGraphics, pen ? getNat(pen) : NULL, rects, count));
558 }
559
560 Status
561 DrawRectangles(const Pen *pen, const RectF *rects, INT count)
562 {
563 return SetStatus(DllExports::GdipDrawRectangles(nativeGraphics, pen ? getNat(pen) : NULL, rects, count));
564 }
565
566 Status
568 const WCHAR *string,
569 INT length,
570 const Font *font,
571 const RectF &layoutRect,
573 const Brush *brush)
574 {
575 return SetStatus(DllExports::GdipDrawString(
576 nativeGraphics, string, length, font ? getNat(font) : NULL, &layoutRect,
577 stringFormat ? getNat(stringFormat) : NULL, brush ? brush->nativeBrush : NULL));
578 }
579
580 Status
581 DrawString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const Brush *brush)
582 {
583 RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
584 return SetStatus(DllExports::GdipDrawString(
585 nativeGraphics, string, length, font ? getNat(font) : NULL, &rect, NULL, brush ? getNat(brush) : NULL));
586 }
587
588 Status
590 const WCHAR *string,
591 INT length,
592 const Font *font,
593 const PointF &origin,
595 const Brush *brush)
596 {
597 RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
598 return SetStatus(DllExports::GdipDrawString(
599 nativeGraphics, string, length, font ? getNat(font) : NULL, &rect,
600 stringFormat ? getNat(stringFormat) : NULL, brush ? getNat(brush) : NULL));
601 }
602
603 Status
605 {
606 return SetStatus(DllExports::GdipEndContainer(nativeGraphics, state));
607 }
608
609 Status
611 const Metafile *metafile,
612 const PointF &destPoint,
614 VOID *callbackData = NULL,
615 const ImageAttributes *imageAttributes = NULL)
616 {
618 }
619
620 Status
622 const Metafile *metafile,
623 const Point *destPoints,
624 INT count,
626 VOID *callbackData = NULL,
627 const ImageAttributes *imageAttributes = NULL)
628 {
630 }
631
632 Status
634 const Metafile *metafile,
635 const Point &destPoint,
636 const Rect &srcRect,
637 Unit srcUnit,
639 VOID *callbackData = NULL,
640 const ImageAttributes *imageAttributes = NULL)
641 {
643 }
644
645 Status
647 const Metafile *metafile,
648 const PointF *destPoints,
649 INT count,
651 VOID *callbackData = NULL,
652 const ImageAttributes *imageAttributes = NULL)
653 {
655 }
656
657 Status
659 const Metafile *metafile,
660 const Rect &destRect,
662 VOID *callbackData = NULL,
663 const ImageAttributes *imageAttributes = NULL)
664 {
666 }
667
668 Status
670 const Metafile *metafile,
671 const RectF &destRect,
672 const RectF &srcRect,
673 Unit srcUnit,
675 VOID *callbackData = NULL,
676 const ImageAttributes *imageAttributes = NULL)
677 {
679 }
680
681 Status
683 const Metafile *metafile,
684 const RectF &destRect,
686 VOID *callbackData = NULL,
687 const ImageAttributes *imageAttributes = NULL)
688 {
690 }
691
692 Status
694 const Metafile *metafile,
695 const PointF &destPoint,
696 const RectF &srcRect,
697 Unit srcUnit,
699 VOID *callbackData = NULL,
700 const ImageAttributes *imageAttributes = NULL)
701 {
703 }
704
705 Status
707 const Metafile *metafile,
708 const Point *destPoints,
709 INT count,
710 const Rect &srcRect,
711 Unit srcUnit,
713 VOID *callbackData = NULL,
714 const ImageAttributes *imageAttributes = NULL)
715 {
717 }
718
719 Status
721 const Metafile *metafile,
722 const Rect &destRect,
723 const Rect &srcRect,
724 Unit srcUnit,
726 VOID *callbackData = NULL,
727 const ImageAttributes *imageAttributes = NULL)
728 {
730 }
731
732 Status
734 const Metafile *metafile,
735 const PointF *destPoints,
736 INT count,
737 const RectF &srcRect,
738 Unit srcUnit,
740 VOID *callbackData = NULL,
741 const ImageAttributes *imageAttributes = NULL)
742 {
744 }
745
746 Status
748 const Metafile *metafile,
749 const Point &destPoint,
751 VOID *callbackData = NULL,
752 const ImageAttributes *imageAttributes = NULL)
753 {
755 }
756
757 Status
759 {
760 return SetStatus(
761 DllExports::GdipSetClipRectI(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, CombineModeExclude));
762 }
763
764 Status
766 {
767 return SetStatus(
768 DllExports::GdipSetClipRect(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, CombineModeExclude));
769 }
770
771 Status
772 ExcludeClip(const Region *region)
773 {
774 return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, getNat(region), CombineModeExclude));
775 }
776
777 Status
778 FillClosedCurve(const Brush *brush, const Point *points, INT count)
779 {
780 return SetStatus(DllExports::GdipFillClosedCurveI(nativeGraphics, brush ? getNat(brush) : NULL, points, count));
781 }
782
783 Status
784 FillClosedCurve(const Brush *brush, const Point *points, INT count, FillMode fillMode, REAL tension)
785 {
786 return SetStatus(DllExports::GdipFillClosedCurve2I(
787 nativeGraphics, brush ? getNat(brush) : NULL, points, count, tension, fillMode));
788 }
789
790 Status
792 {
793 return SetStatus(DllExports::GdipFillClosedCurve(nativeGraphics, brush ? getNat(brush) : NULL, points, count));
794 }
795
796 Status
798 {
799 return SetStatus(DllExports::GdipFillClosedCurve2(
800 nativeGraphics, brush ? getNat(brush) : NULL, points, count, tension, fillMode));
801 }
802
803 Status
804 FillEllipse(const Brush *brush, const Rect &rect)
805 {
806 return SetStatus(DllExports::GdipFillEllipseI(
807 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
808 }
809
810 Status
812 {
813 return SetStatus(
814 DllExports::GdipFillEllipse(nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height));
815 }
816
817 Status
818 FillEllipse(const Brush *brush, const RectF &rect)
819 {
820 return SetStatus(DllExports::GdipFillEllipse(
821 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
822 }
823
824 Status
826 {
827 return SetStatus(
828 DllExports::GdipFillEllipseI(nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height));
829 }
830
831 Status
832 FillPath(const Brush *brush, const GraphicsPath *path)
833 {
834 return SetStatus(DllExports::GdipFillPath(nativeGraphics, getNat(brush), getNat(path)));
835 }
836
837 Status
838 FillPie(const Brush *brush, const Rect &rect, REAL startAngle, REAL sweepAngle)
839 {
840 return SetStatus(DllExports::GdipFillPieI(
841 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle,
842 sweepAngle));
843 }
844
845 Status
846 FillPie(const Brush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
847 {
848 return SetStatus(DllExports::GdipFillPieI(
849 nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height, startAngle, sweepAngle));
850 }
851
852 Status
853 FillPie(const Brush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
854 {
855 return SetStatus(DllExports::GdipFillPie(
856 nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height, startAngle, sweepAngle));
857 }
858
859 Status
860 FillPie(const Brush *brush, RectF &rect, REAL startAngle, REAL sweepAngle)
861 {
862 return SetStatus(DllExports::GdipFillPie(
863 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle,
864 sweepAngle));
865 }
866
867 Status
868 FillPolygon(const Brush *brush, const Point *points, INT count)
869 {
870 return SetStatus(DllExports::GdipFillPolygon2I(nativeGraphics, brush ? getNat(brush) : NULL, points, count));
871 }
872
873 Status
874 FillPolygon(const Brush *brush, const PointF *points, INT count)
875 {
876 return SetStatus(DllExports::GdipFillPolygon2(nativeGraphics, brush ? getNat(brush) : NULL, points, count));
877 }
878
879 Status
881 {
882 return SetStatus(
883 DllExports::GdipFillPolygonI(nativeGraphics, brush ? getNat(brush) : NULL, points, count, fillMode));
884 }
885
886 Status
888 {
889 return SetStatus(
890 DllExports::GdipFillPolygon(nativeGraphics, brush ? getNat(brush) : NULL, points, count, fillMode));
891 }
892
893 Status
894 FillRectangle(const Brush *brush, const Rect &rect)
895 {
896 return SetStatus(DllExports::GdipFillRectangleI(
897 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
898 }
899
900 Status
901 FillRectangle(const Brush *brush, const RectF &rect)
902 {
903 return SetStatus(DllExports::GdipFillRectangle(
904 nativeGraphics, brush ? getNat(brush) : NULL, rect.X, rect.Y, rect.Width, rect.Height));
905 }
906
907 Status
909 {
910 return SetStatus(
911 DllExports::GdipFillRectangle(nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height));
912 }
913
914 Status
916 {
917 return SetStatus(
918 DllExports::GdipFillRectangleI(nativeGraphics, brush ? getNat(brush) : NULL, x, y, width, height));
919 }
920
921 Status
922 FillRectangles(const Brush *brush, const Rect *rects, INT count)
923 {
924 return SetStatus(DllExports::GdipFillRectanglesI(nativeGraphics, brush ? getNat(brush) : NULL, rects, count));
925 }
926
927 Status
928 FillRectangles(const Brush *brush, const RectF *rects, INT count)
929 {
930 return SetStatus(DllExports::GdipFillRectangles(nativeGraphics, brush ? getNat(brush) : NULL, rects, count));
931 }
932
933 Status
934 FillRegion(const Brush *brush, const Region *region)
935 {
936 return SetStatus(DllExports::GdipFillRegion(nativeGraphics, getNat(brush), getNat(region)));
937 }
938
939 VOID
941 {
942 DllExports::GdipFlush(nativeGraphics, intention);
943 }
944
945 static Graphics *
947 {
948 return new Graphics(hdc);
949 }
950
951 static Graphics *
953 {
954 return new Graphics(hdc, hDevice);
955 }
956
957 static Graphics *
959 {
960 return new Graphics(hWnd, icm);
961 }
962
963 static Graphics *
965 {
966 return new Graphics(image);
967 }
968
969 Status
970 GetClip(Region *region) const
971 {
972 return SetStatus(DllExports::GdipGetClip(nativeGraphics, getNat(region)));
973 }
974
975 Status
977 {
978 return SetStatus(DllExports::GdipGetClipBoundsI(nativeGraphics, rect));
979 }
980
981 Status
983 {
984 return SetStatus(DllExports::GdipGetClipBounds(nativeGraphics, rect));
985 }
986
989 {
990 CompositingMode compositingMode;
991 SetStatus(DllExports::GdipGetCompositingMode(nativeGraphics, &compositingMode));
992 return compositingMode;
993 }
994
997 {
998 CompositingQuality compositingQuality;
999 SetStatus(DllExports::GdipGetCompositingQuality(nativeGraphics, &compositingQuality));
1000 return compositingQuality;
1001 }
1002
1003 REAL
1004 GetDpiX() const
1005 {
1006 REAL dpi;
1007 SetStatus(DllExports::GdipGetDpiX(nativeGraphics, &dpi));
1008 return dpi;
1009 }
1010
1011 REAL
1012 GetDpiY() const
1013 {
1014 REAL dpi;
1015 SetStatus(DllExports::GdipGetDpiY(nativeGraphics, &dpi));
1016 return dpi;
1017 }
1018
1019 static HPALETTE
1021 {
1022 return NULL;
1023 }
1024
1025 HDC
1027 {
1028 HDC hdc = NULL;
1029 SetStatus(DllExports::GdipGetDC(nativeGraphics, &hdc));
1030 return hdc;
1031 }
1032
1035 {
1036 InterpolationMode interpolationMode;
1037 SetStatus(DllExports::GdipGetInterpolationMode(nativeGraphics, &interpolationMode));
1038 return interpolationMode;
1039 }
1040
1041 Status
1043 {
1044 return lastStatus;
1045 }
1046
1047 Status
1049 {
1050 if (color == NULL)
1052
1053 ARGB argb = color->GetValue();
1054 SetStatus(DllExports::GdipGetNearestColor(nativeGraphics, &argb));
1055
1056 color->SetValue(argb);
1057 return lastStatus;
1058 }
1059
1060 REAL
1062 {
1063 REAL scale;
1064 SetStatus(DllExports::GdipGetPageScale(nativeGraphics, &scale));
1065 return scale;
1066 }
1067
1068 Unit
1070 {
1071 Unit unit;
1072 SetStatus(DllExports::GdipGetPageUnit(nativeGraphics, &unit));
1073 return unit;
1074 }
1075
1078 {
1079 PixelOffsetMode pixelOffsetMode;
1080 SetStatus(DllExports::GdipGetPixelOffsetMode(nativeGraphics, &pixelOffsetMode));
1081 return pixelOffsetMode;
1082 }
1083
1084 Status
1086 {
1087 return SetStatus(DllExports::GdipGetRenderingOrigin(nativeGraphics, x, y));
1088 }
1089
1092 {
1093 SmoothingMode smoothingMode;
1094 SetStatus(DllExports::GdipGetSmoothingMode(nativeGraphics, &smoothingMode));
1095 return smoothingMode;
1096 }
1097
1098 UINT
1100 {
1101 UINT contrast;
1102 SetStatus(DllExports::GdipGetTextContrast(nativeGraphics, &contrast));
1103 return contrast;
1104 }
1105
1108 {
1110 SetStatus(DllExports::GdipGetTextRenderingHint(nativeGraphics, &mode));
1111 return mode;
1112 }
1113
1114 UINT
1116 {
1117#if 1
1118 return SetStatus(NotImplemented); // FIXME
1119#else
1120 UINT gammaValue;
1121 SetStatus(DllExports::GdipGetTextGammaValue(nativeGraphics, &gammaValue));
1122 return gammaValue;
1123#endif
1124 }
1125
1126 Status
1128 {
1129 return SetStatus(DllExports::GdipGetWorldTransform(nativeGraphics, getNat(matrix)));
1130 }
1131
1132 Status
1134 {
1135 return SetStatus(DllExports::GdipGetVisibleClipBoundsI(nativeGraphics, rect));
1136 }
1137
1138 Status
1140 {
1141 return SetStatus(DllExports::GdipGetVisibleClipBounds(nativeGraphics, rect));
1142 }
1143
1144 Status
1146 {
1147 return SetStatus(DllExports::GdipSetClipRectI(
1148 nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, CombineModeIntersect));
1149 }
1150
1151 Status
1152 IntersectClip(const Region *region)
1153 {
1154 return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, getNat(region), CombineModeIntersect));
1155 }
1156
1157 Status
1159 {
1160 return SetStatus(
1161 DllExports::GdipSetClipRect(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, CombineModeIntersect));
1162 }
1163
1164 BOOL
1166 {
1167 BOOL result;
1168 SetStatus(DllExports::GdipIsClipEmpty(nativeGraphics, &result));
1169 return result;
1170 }
1171
1172 BOOL
1173 IsVisible(const Point &point) const
1174 {
1175 BOOL result;
1176 SetStatus(DllExports::GdipIsVisiblePointI(nativeGraphics, point.X, point.Y, &result));
1177 return result;
1178 }
1179
1180 BOOL
1181 IsVisible(const Rect &rect) const
1182 {
1183 BOOL result;
1184 SetStatus(DllExports::GdipIsVisibleRectI(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, &result));
1185 return result;
1186 }
1187
1188 BOOL
1190 {
1191 BOOL result;
1192 SetStatus(DllExports::GdipIsVisiblePoint(nativeGraphics, x, y, &result));
1193 return result;
1194 }
1195
1196 BOOL
1197 IsVisible(const RectF &rect) const
1198 {
1199 BOOL result;
1200 SetStatus(DllExports::GdipIsVisibleRect(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, &result));
1201 return result;
1202 }
1203
1204 BOOL
1206 {
1207 BOOL result;
1208 SetStatus(DllExports::GdipIsVisibleRectI(nativeGraphics, x, y, width, height, &result));
1209 return result;
1210 }
1211
1212 BOOL
1214 {
1215 BOOL result;
1216 SetStatus(DllExports::GdipIsVisiblePointI(nativeGraphics, x, y, &result));
1217 return result;
1218 }
1219
1220 BOOL
1221 IsVisible(const PointF &point) const
1222 {
1223 BOOL result;
1224 SetStatus(DllExports::GdipIsVisiblePoint(nativeGraphics, point.X, point.Y, &result));
1225 return result;
1226 }
1227
1228 BOOL
1230 {
1231 BOOL result;
1232 SetStatus(DllExports::GdipIsVisibleRect(nativeGraphics, x, y, width, height, &result));
1233 return result;
1234 }
1235
1236 BOOL
1238 {
1239 BOOL flag = FALSE;
1240 SetStatus(DllExports::GdipIsVisibleClipEmpty(nativeGraphics, &flag));
1241 return flag;
1242 }
1243
1244 Status
1246 const WCHAR *string,
1247 INT length,
1248 const Font *font,
1249 const RectF &layoutRect,
1251 INT regionCount,
1252 Region *regions) const
1253 {
1254 return NotImplemented;
1255 }
1256
1257 Status
1259 const UINT16 *text,
1260 INT length,
1261 const Font *font,
1262 const PointF *positions,
1263 INT flags,
1264 const Matrix *matrix,
1265 RectF *boundingBox) const
1266 {
1267 return NotImplemented;
1268 }
1269
1270 Status
1271 MeasureString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, RectF *boundingBox) const
1272 {
1273 return NotImplemented;
1274 }
1275
1276 Status
1278 const WCHAR *string,
1279 INT length,
1280 const Font *font,
1281 const PointF &origin,
1283 RectF *boundingBox) const
1284 {
1285 return NotImplemented;
1286 }
1287
1288 Status
1290 const WCHAR *string,
1291 INT length,
1292 const Font *font,
1293 const RectF &layoutRect,
1295 RectF *boundingBox,
1296 INT *codepointsFitted,
1297 INT *linesFilled) const
1298 {
1299 return NotImplemented;
1300 }
1301
1302 Status
1304 const WCHAR *string,
1305 INT length,
1306 const Font *font,
1307 const SizeF &layoutRectSize,
1309 SizeF *size,
1310 INT *codepointsFitted,
1311 INT *linesFilled) const
1312 {
1313 return NotImplemented;
1314 }
1315
1316 Status
1317 MeasureString(const WCHAR *string, INT length, const Font *font, const PointF &origin, RectF *boundingBox) const
1318 {
1319 return NotImplemented;
1320 }
1321
1322 Status
1324 {
1325 return SetStatus(DllExports::GdipMultiplyWorldTransform(nativeGraphics, getNat(matrix), order));
1326 }
1327
1328 VOID
1330 {
1331 SetStatus(DllExports::GdipReleaseDC(nativeGraphics, hdc));
1332 }
1333
1334 Status
1336 {
1337 return SetStatus(DllExports::GdipResetClip(nativeGraphics));
1338 }
1339
1340 Status
1342 {
1343 return SetStatus(DllExports::GdipResetWorldTransform(nativeGraphics));
1344 }
1345
1346 Status
1348 {
1349 return SetStatus(DllExports::GdipRestoreGraphics(nativeGraphics, gstate));
1350 }
1351
1352 Status
1354 {
1355 return SetStatus(DllExports::GdipRotateWorldTransform(nativeGraphics, angle, order));
1356 }
1357
1360 {
1361 GraphicsState gstate;
1362 SetStatus(DllExports::GdipSaveGraphics(nativeGraphics, &gstate));
1363 return gstate;
1364 }
1365
1366 Status
1368 {
1369 return SetStatus(DllExports::GdipScaleWorldTransform(nativeGraphics, sx, sy, order));
1370 }
1371
1372 Status
1374 {
1375 return SetStatus(DllExports::GdipSetClipGraphics(nativeGraphics, g ? getNat(g) : NULL, combineMode));
1376 }
1377
1378 Status
1380 {
1381 return SetStatus(DllExports::GdipSetClipPath(nativeGraphics, getNat(path), combineMode));
1382 }
1383
1384 Status
1385 SetClip(const Region *region, CombineMode combineMode = CombineModeReplace)
1386 {
1387 return SetStatus(DllExports::GdipSetClipRegion(nativeGraphics, getNat(region), combineMode));
1388 }
1389
1390 Status
1392 {
1393 return SetStatus(
1394 DllExports::GdipSetClipRectI(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, combineMode));
1395 }
1396
1397 Status
1399 {
1400 return SetStatus(DllExports::GdipSetClipHrgn(nativeGraphics, hRgn, combineMode));
1401 }
1402
1403 Status
1405 {
1406 return SetStatus(
1407 DllExports::GdipSetClipRect(nativeGraphics, rect.X, rect.Y, rect.Width, rect.Height, combineMode));
1408 }
1409
1410 Status
1412 {
1413 return SetStatus(DllExports::GdipSetCompositingMode(nativeGraphics, compositingMode));
1414 }
1415
1416 Status
1418 {
1419 return SetStatus(DllExports::GdipSetCompositingQuality(nativeGraphics, compositingQuality));
1420 }
1421
1422 Status
1424 {
1425 return SetStatus(DllExports::GdipSetInterpolationMode(nativeGraphics, interpolationMode));
1426 }
1427
1428 Status
1430 {
1431 return SetStatus(DllExports::GdipSetPageScale(nativeGraphics, scale));
1432 }
1433
1434 Status
1436 {
1437 return SetStatus(DllExports::GdipSetPageUnit(nativeGraphics, unit));
1438 }
1439
1440 Status
1442 {
1443 return SetStatus(DllExports::GdipSetPixelOffsetMode(nativeGraphics, pixelOffsetMode));
1444 }
1445
1446 Status
1448 {
1449 return SetStatus(DllExports::GdipSetRenderingOrigin(nativeGraphics, x, y));
1450 }
1451
1452 Status
1454 {
1455 return SetStatus(DllExports::GdipSetSmoothingMode(nativeGraphics, smoothingMode));
1456 }
1457
1458 Status
1460 {
1461 return SetStatus(DllExports::GdipSetTextContrast(nativeGraphics, contrast));
1462 }
1463
1464 Status
1466 {
1467 return SetStatus(DllExports::GdipSetTextRenderingHint(nativeGraphics, newMode));
1468 }
1469
1470 Status
1472 {
1473 return SetStatus(DllExports::GdipSetWorldTransform(nativeGraphics, getNat(matrix)));
1474 }
1475
1476 Status
1478 {
1479 return SetStatus(DllExports::GdipTransformPointsI(nativeGraphics, destSpace, srcSpace, pts, count));
1480 }
1481
1482 Status
1484 {
1485 return SetStatus(DllExports::GdipTransformPoints(nativeGraphics, destSpace, srcSpace, pts, count));
1486 }
1487
1488 Status
1490 {
1491 return SetStatus(DllExports::GdipTranslateClipI(nativeGraphics, dx, dy));
1492 }
1493
1494 Status
1496 {
1497 return SetStatus(DllExports::GdipTranslateClip(nativeGraphics, dx, dy));
1498 }
1499
1500 Status
1502 {
1503 return SetStatus(DllExports::GdipTranslateWorldTransform(nativeGraphics, dx, dy, order));
1504 }
1505
1506 private:
1507 Status
1509 {
1510 if (status != Ok)
1512 return status;
1513 }
1514
1515 VOID
1517 {
1518 nativeGraphics = graphics;
1519 }
1520
1521 protected:
1524
1525 // get native
1526 friend inline GpGraphics *&
1527 getNat(const Graphics *graphics)
1528 {
1529 return const_cast<Graphics *>(graphics)->nativeGraphics;
1530 }
1531};
1532
1533#endif /* _GDIPLUSGRAPHICS_H */
unsigned short UINT16
static int state
Definition: maze.c:121
HWND hWnd
Definition: settings.c:17
static const WCHAR stringFormat[]
Definition: wordpad.c:55
GpBrush * nativeBrush
Definition: gdiplusbrush.h:64
Status DrawCurve(const Pen *pen, const Point *points, INT count)
Status FillClosedCurve(const Brush *brush, const PointF *points, INT count)
Status FillClosedCurve(const Brush *brush, const PointF *points, INT count, FillMode fillMode, REAL tension)
Status SetStatus(Status status) const
Status GetRenderingOrigin(INT *x, INT *y) const
Status DrawBezier(const Pen *pen, const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
Status EnumerateMetafile(const Metafile *metafile, const Point *destPoints, INT count, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status DrawImage(Image *image, INT x, INT y)
Status SetCompositingMode(CompositingMode compositingMode)
Status TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, Point *pts, INT count)
Status DrawLine(const Pen *pen, const PointF &pt1, const Point &pt2)
Status EnumerateMetafile(const Metafile *metafile, const Rect &destRect, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status DrawString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const Brush *brush)
BOOL IsVisible(const Point &point) const
CompositingMode GetCompositingMode() const
Status MultiplyTransform(Matrix *matrix, MatrixOrder order)
Status DrawCurve(const Pen *pen, const PointF *points, INT count)
Status DrawImage(Image *image, INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit)
REAL GetDpiY() const
Status DrawImage(Image *image, REAL x, REAL y)
Status DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Status DrawImage(Image *image, const RectF &rect)
Status FillPolygon(const Brush *brush, const PointF *points, INT count, FillMode fillMode)
Status Restore(GraphicsState gstate)
Status Clear(const Color &color)
Status DrawCurve(const Pen *pen, const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
Graphics(HWND hwnd, BOOL icm=FALSE)
Status SetPageUnit(Unit unit)
Status DrawEllipse(const Pen *pen, INT x, INT y, INT width, INT height)
Status IntersectClip(const Rect &rect)
Status SetClip(const Graphics *g, CombineMode combineMode=CombineModeReplace)
BOOL IsVisible(const Rect &rect) const
Status GetNearestColor(Color *color) const
Status DrawImage(Image *image, REAL x, REAL y, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit)
Status MeasureDriverString(const UINT16 *text, INT length, const Font *font, const PointF *positions, INT flags, const Matrix *matrix, RectF *boundingBox) const
Status DrawLine(const Pen *pen, INT x1, INT y1, INT x2, INT y2)
friend GpGraphics *& getNat(const Graphics *graphics)
Status DrawPie(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
Status DrawPie(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Status DrawString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, const Brush *brush)
Status FillEllipse(const Brush *brush, INT x, INT y, INT width, INT height)
Status FillEllipse(const Brush *brush, const RectF &rect)
Status DrawPolygon(const Pen *pen, const Point *points, INT count)
GraphicsState Save()
Status FillClosedCurve(const Brush *brush, const Point *points, INT count)
GraphicsContainer BeginContainer()
Status GetClipBounds(Rect *rect) const
Status SetClip(const Rect &rect, CombineMode combineMode=CombineModeReplace)
Status SetClip(const RectF &rect, CombineMode combineMode=CombineModeReplace)
Status FillEllipse(const Brush *brush, const Rect &rect)
Status ExcludeClip(const Rect &rect)
Status FillPolygon(const Brush *brush, const PointF *points, INT count)
Status FillPie(const Brush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Status DrawCurve(const Pen *pen, const Point *points, INT count, REAL tension)
Status TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF *pts, INT count)
Status DrawPolygon(const Pen *pen, const PointF *points, INT count)
Status ExcludeClip(const RectF &rect)
Status ExcludeClip(const Region *region)
Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
UINT GetTextContrast() const
Status IntersectClip(const RectF &rect)
Status DrawImage(Image *image, INT x, INT y, INT width, INT height)
Status SetTextRenderingHint(TextRenderingHint newMode)
Status DrawLine(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2)
Status EnumerateMetafile(const Metafile *metafile, const RectF &destRect, const RectF &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status GetVisibleClipBounds(Rect *rect) const
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order=MatrixOrderPrepend)
Status SetTextContrast(UINT contrast)
BOOL IsVisible(REAL x, REAL y, REAL width, REAL height) const
Status DrawString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const StringFormat *stringFormat, const Brush *brush)
CompositingQuality GetCompositingQuality() const
UINT GetTextGammaValue() const
Status SetPageScale(REAL scale)
Graphics(HDC hdc)
Status DrawClosedCurve(const Pen *pen, const Point *points, INT count, REAL tension)
Status SetSmoothingMode(SmoothingMode smoothingMode)
Status DrawCurve(const Pen *pen, const PointF *points, INT count, REAL tension)
BOOL IsVisible(REAL x, REAL y) const
Status DrawImage(Image *image, const Point *destPoints, INT count, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit, ImageAttributes *imageAttributes=NULL, DrawImageAbort callback=NULL, VOID *callbackData=NULL)
Status DrawRectangles(const Pen *pen, const Rect *rects, INT count)
Status FillPath(const Brush *brush, const GraphicsPath *path)
Status AddMetafileComment(const BYTE *data, UINT sizeData)
Status DrawLines(const Pen *pen, const PointF *points, INT count)
Status DrawDriverString(const UINT16 *text, INT length, const Font *font, const Brush *brush, const PointF *positions, INT flags, const Matrix *matrix)
Status DrawRectangle(const Pen *pen, const Rect &rect)
Unit GetPageUnit() const
Status DrawPath(const Pen *pen, const GraphicsPath *path)
Status EnumerateMetafile(const Metafile *metafile, const Point &destPoint, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
static Graphics * FromHDC(HDC hdc)
static HPALETTE GetHalftonePalette()
VOID Flush(FlushIntention intention)
VOID SetNativeGraphics(GpGraphics *graphics)
Status MeasureString(const WCHAR *string, INT length, const Font *font, const PointF &origin, RectF *boundingBox) const
Status MeasureString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, RectF *boundingBox) const
Status FillPolygon(const Brush *brush, const Point *points, INT count, FillMode fillMode)
Status DrawPie(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
Status MeasureString(const WCHAR *string, INT length, const Font *font, const SizeF &layoutRectSize, const StringFormat *stringFormat, SizeF *size, INT *codepointsFitted, INT *linesFilled) const
Status SetClip(const GraphicsPath *path, CombineMode combineMode=CombineModeReplace)
Status EnumerateMetafile(const Metafile *metafile, const Rect &destRect, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status GetClipBounds(RectF *rect) const
Status FillRectangles(const Brush *brush, const Rect *rects, INT count)
Status FillClosedCurve(const Brush *brush, const Point *points, INT count, FillMode fillMode, REAL tension)
static Graphics * FromImage(Image *image)
VOID ReleaseHDC(HDC hdc)
GraphicsContainer BeginContainer(const RectF &dstrect, const RectF &srcrect, Unit unit)
Status DrawArc(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle)
Status DrawClosedCurve(const Pen *pen, const Point *points, INT count)
REAL GetPageScale() const
Status EnumerateMetafile(const Metafile *metafile, const PointF *destPoints, INT count, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status FillEllipse(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
Status lastStatus
REAL GetDpiX() const
Status DrawRectangle(const Pen *pen, INT x, INT y, INT width, INT height)
Status DrawLines(const Pen *pen, const Point *points, INT count)
Status IntersectClip(const Region *region)
Status RotateTransform(REAL angle, MatrixOrder order=MatrixOrderPrepend)
Status DrawBeziers(const Pen *pen, const PointF *points, INT count)
Status EnumerateMetafile(const Metafile *metafile, const Point &destPoint, const Rect &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status TranslateClip(REAL dx, REAL dy)
Status DrawRectangles(const Pen *pen, const RectF *rects, INT count)
Status SetTransform(const Matrix *matrix)
Status DrawImage(Image *image, const Rect &destRect, INT srcx, INT srcy, INT srcwidth, INT srcheight, Unit srcUnit, const ImageAttributes *imageAttributes=NULL, DrawImageAbort callback=NULL, VOID *callbackData=NULL)
Status DrawBezier(const Pen *pen, const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
Status GetTransform(Matrix *matrix) const
TextRenderingHint GetTextRenderingHint() const
Status ResetClip()
BOOL IsVisible(INT x, INT y, INT width, INT height) const
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)
Status DrawImage(Image *image, const PointF *destPoints, INT count)
Status FillPie(const Brush *brush, RectF &rect, REAL startAngle, REAL sweepAngle)
Status GetClip(Region *region) const
Status DrawBezier(const Pen *pen, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
Status MeasureString(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, RectF *boundingBox, INT *codepointsFitted, INT *linesFilled) const
Status DrawBeziers(const Pen *pen, const Point *points, INT count)
Status DrawImage(Image *image, REAL x, REAL y, REAL width, REAL height)
Graphics(Image *image)
Status EnumerateMetafile(const Metafile *metafile, const RectF &destRect, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status DrawRectangle(const Pen *pen, const RectF &rect)
Status SetPixelOffsetMode(PixelOffsetMode pixelOffsetMode)
Status EnumerateMetafile(const Metafile *metafile, const PointF &destPoint, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status SetClip(HRGN hRgn, CombineMode combineMode=CombineModeReplace)
BOOL IsVisibleClipEmpty() const
Status FillRectangle(const Brush *brush, const Rect &rect)
Status DrawImage(Image *image, const Rect &rect)
Status DrawImage(Image *image, const PointF &point)
Graphics(HDC hdc, HANDLE hdevice)
Status DrawEllipse(const Pen *pen, REAL x, REAL y, REAL width, REAL height)
Status EnumerateMetafile(const Metafile *metafile, const PointF *destPoints, INT count, const RectF &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status TranslateClip(INT dx, INT dy)
Status FillRectangle(const Brush *brush, INT x, INT y, INT width, INT height)
Status MeasureString(const WCHAR *string, INT length, const Font *font, const PointF &origin, const StringFormat *stringFormat, RectF *boundingBox) const
Status SetCompositingQuality(CompositingQuality compositingQuality)
Status FillRectangles(const Brush *brush, const RectF *rects, INT count)
Status DrawArc(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle)
Status DrawLine(const Pen *pen, const Point &pt1, const Point &pt2)
Status EnumerateMetafile(const Metafile *metafile, const PointF &destPoint, const RectF &srcRect, Unit srcUnit, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
Status MeasureCharacterRanges(const WCHAR *string, INT length, const Font *font, const RectF &layoutRect, const StringFormat *stringFormat, INT regionCount, Region *regions) const
BOOL IsVisible(const RectF &rect) const
Status DrawCurve(const Pen *pen, const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
InterpolationMode GetInterpolationMode() const
BOOL IsClipEmpty() const
Status DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Status FillRegion(const Brush *brush, const Region *region)
static Graphics * FromHWND(HWND hWnd, BOOL icm)
static Graphics * FromHDC(HDC hdc, HANDLE hDevice)
Status EnumerateMetafile(const Metafile *metafile, const Point *destPoints, INT count, EnumerateMetafileProc callback, VOID *callbackData=NULL, const ImageAttributes *imageAttributes=NULL)
BOOL IsVisible(INT x, INT y) const
BOOL IsVisible(const PointF &point) const
Status GetLastStatus() const
Status DrawCachedBitmap(CachedBitmap *cb, INT x, INT y)
Status DrawImage(Image *image, const Point *destPoints, INT count)
Status GetVisibleClipBounds(RectF *rect) const
Status FillRectangle(const Brush *brush, const RectF &rect)
Status ResetTransform()
Status SetInterpolationMode(InterpolationMode interpolationMode)
Status EndContainer(GraphicsContainer state)
SmoothingMode GetSmoothingMode() const
Status DrawEllipse(const Pen *pen, const RectF &rect)
Status DrawPie(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Status FillPolygon(const Brush *brush, const Point *points, INT count)
Status DrawBezier(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
GraphicsContainer BeginContainer(const Rect &dstrect, const Rect &srcrect, Unit unit)
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order=MatrixOrderPrepend)
Status DrawImage(Image *image, const RectF &destRect, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, Unit srcUnit, ImageAttributes *imageAttributes=NULL, DrawImageAbort callback=NULL, VOID *callbackData=NULL)
Status DrawRectangle(const Pen *pen, REAL x, REAL y, REAL width, REAL height)
Status DrawImage(Image *image, const Point &point)
Status FillPie(const Brush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Status SetRenderingOrigin(INT x, INT y)
Status FillRectangle(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
PixelOffsetMode GetPixelOffsetMode() const
Status DrawClosedCurve(const Pen *pen, const PointF *points, INT count)
GpGraphics * nativeGraphics
Status DrawEllipse(const Pen *pen, const Rect &rect)
Status FillPie(const Brush *brush, const Rect &rect, REAL startAngle, REAL sweepAngle)
Status SetClip(const Region *region, CombineMode combineMode=CombineModeReplace)
Definition: gdipluspen.h:23
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
float REAL
Definition: types.h:41
const WCHAR * text
Definition: package.c:1799
POINTL point
Definition: edittest.c:50
unsigned int BOOL
Definition: ntddk_ex.h:94
SmoothingMode
Definition: gdiplusenums.h:121
CompositingMode
Definition: gdiplusenums.h:248
CombineMode
Definition: gdiplusenums.h:350
@ CombineModeReplace
Definition: gdiplusenums.h:351
@ CombineModeIntersect
Definition: gdiplusenums.h:352
@ CombineModeExclude
Definition: gdiplusenums.h:355
PixelOffsetMode
Definition: gdiplusenums.h:160
UINT GraphicsContainer
Definition: gdiplusenums.h:23
FillMode
Definition: gdiplusenums.h:54
CompositingQuality
Definition: gdiplusenums.h:131
MatrixOrder
Definition: gdiplusenums.h:187
@ MatrixOrderPrepend
Definition: gdiplusenums.h:188
TextRenderingHint
Definition: gdiplusenums.h:254
Unit
Definition: gdiplusenums.h:26
FlushIntention
Definition: gdiplusenums.h:360
UINT GraphicsState
Definition: gdiplusenums.h:22
CoordinateSpace
Definition: gdiplusenums.h:366
InterpolationMode
Definition: gdiplusenums.h:141
DWORD ARGB
ImageAbort DrawImageAbort
Definition: gdiplustypes.h:56
Status
Definition: gdiplustypes.h:25
@ Ok
Definition: gdiplustypes.h:26
@ InvalidParameter
Definition: gdiplustypes.h:28
@ NotImplemented
Definition: gdiplustypes.h:32
BOOL(CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType, UINT, UINT, const BYTE *, VOID *)
Definition: gdiplustypes.h:60
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
GLuint color
Definition: glext.h:6243
GLuint GLenum matrix
Definition: glext.h:9407
GLenum mode
Definition: glext.h:6217
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLboolean GLboolean g
Definition: glext.h:6204
GLfloat angle
Definition: glext.h:10853
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLuint64EXT * result
Definition: glext.h:11304
GLsizei const GLfloat * points
Definition: glext.h:8112
GLenum fillMode
Definition: glext.h:11728
GLintptr offset
Definition: glext.h:5920
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 flag
Definition: glfuncs.h:52
voidpf uLong int origin
Definition: ioapi.h:144
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HRGN hRgn
Definition: mapping.c:33
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static const unsigned char metafile[]
Definition: olepicture.c:138
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
png_const_structrp png_const_inforp int * unit
Definition: png.h:2159
& rect
Definition: startmenu.cpp:1413
REAL Y
Definition: gdiplustypes.h:649
REAL X
Definition: gdiplustypes.h:648
REAL Height
Definition: gdiplustypes.h:664
REAL X
Definition: gdiplustypes.h:661
REAL Width
Definition: gdiplustypes.h:663
REAL Y
Definition: gdiplustypes.h:662
INT Width
Definition: gdiplustypes.h:671
INT Height
Definition: gdiplustypes.h:672
INT X
Definition: gdiplustypes.h:669
INT Y
Definition: gdiplustypes.h:670
Definition: ps.c:97
int32_t INT
Definition: typedefs.h:58
#define dpi
Definition: sysparams.c:23
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193