ReactOS 0.4.15-dev-7907-g95bf896
gdipluspath.h
Go to the documentation of this file.
1/*
2 * GdiPlusPath.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 _GDIPLUSPATH_H
20#define _GDIPLUSPATH_H
21
23{
24 friend class Region;
25 friend class CustomLineCap;
26 friend class Graphics;
27
28 public:
30 {
31 lastStatus = DllExports::GdipCreatePath2I(points, types, count, fillMode, &nativePath);
32 }
33
35 {
36 lastStatus = DllExports::GdipCreatePath(fillMode, &nativePath);
37 }
38
41 {
42 lastStatus = DllExports::GdipCreatePath2(points, types, count, fillMode, &nativePath);
43 }
44
46 {
47 DllExports::GdipDeletePath(nativePath);
48 }
49
50 Status
51 AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle)
52 {
53 return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
54 }
55
56 Status
57 AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle)
58 {
59 return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
60 }
61
62 Status
63 AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
64 {
65 return SetStatus(DllExports::GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle));
66 }
67
68 Status
69 AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
70 {
71 return SetStatus(DllExports::GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle));
72 }
73
74 Status
75 AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
76 {
77 return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
78 }
79
80 Status
82 {
83 return SetStatus(DllExports::GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4));
84 }
85
86 Status
87 AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
88 {
89 return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
90 }
91
92 Status
93 AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
94 {
95 return SetStatus(DllExports::GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4));
96 }
97
98 Status
100 {
101 return SetStatus(DllExports::GdipAddPathBeziersI(nativePath, points, count));
102 }
103
104 Status
106 {
107 return SetStatus(DllExports::GdipAddPathBeziers(nativePath, points, count));
108 }
109
110 Status
112 {
113 return SetStatus(DllExports::GdipAddPathClosedCurveI(nativePath, points, count));
114 }
115
116 Status
118 {
119 return SetStatus(DllExports::GdipAddPathClosedCurve2I(nativePath, points, count, tension));
120 }
121
122 Status
124 {
125 return SetStatus(DllExports::GdipAddPathClosedCurve2(nativePath, points, count, tension));
126 }
127
128 Status
130 {
131 return SetStatus(DllExports::GdipAddPathClosedCurve(nativePath, points, count));
132 }
133
134 Status
136 {
137 return SetStatus(DllExports::GdipAddPathCurveI(nativePath, points, count));
138 }
139
140 Status
141 AddCurve(const PointF *points, INT count, REAL tension)
142 {
143 return SetStatus(DllExports::GdipAddPathCurve2(nativePath, points, count, tension));
144 }
145
146 Status
148 {
149 return SetStatus(DllExports::GdipAddPathCurve(nativePath, points, count));
150 }
151
152 Status
153 AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
154 {
155 return SetStatus(DllExports::GdipAddPathCurve3I(nativePath, points, count, offset, numberOfSegments, tension));
156 }
157
158 Status
159 AddCurve(const Point *points, INT count, REAL tension)
160 {
161 return SetStatus(DllExports::GdipAddPathCurve2I(nativePath, points, count, tension));
162 }
163
164 Status
165 AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
166 {
167 return SetStatus(DllExports::GdipAddPathCurve3(nativePath, points, count, offset, numberOfSegments, tension));
168 }
169
170 Status
172 {
173 return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height);
174 }
175
176 Status
178 {
179 return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height);
180 }
181
182 Status
184 {
185 return SetStatus(DllExports::GdipAddPathEllipseI(nativePath, x, y, width, height));
186 }
187
188 Status
190 {
191 return SetStatus(DllExports::GdipAddPathEllipse(nativePath, x, y, width, height));
192 }
193
194 Status
195 AddLine(const Point &pt1, const Point &pt2)
196 {
197 return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y);
198 }
199
200 Status
201 AddLine(const PointF &pt1, const PointF &pt2)
202 {
203 return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y);
204 }
205
206 Status
208 {
209 return SetStatus(DllExports::GdipAddPathLine(nativePath, x1, y1, x2, y2));
210 }
211
212 Status
214 {
215 return SetStatus(DllExports::GdipAddPathLineI(nativePath, x1, y1, x2, y2));
216 }
217
218 Status
220 {
221 return SetStatus(DllExports::GdipAddPathLine2I(nativePath, points, count));
222 }
223
224 Status
226 {
227 return SetStatus(DllExports::GdipAddPathLine2(nativePath, points, count));
228 }
229
230 Status
231 AddPath(const GraphicsPath *addingPath, BOOL connect)
232 {
233 GpPath *nativePath2 = addingPath ? getNat(addingPath) : NULL;
234 return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2, connect));
235 }
236
237 Status
238 AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle)
239 {
240 return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
241 }
242
243 Status
244 AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
245 {
246 return SetStatus(DllExports::GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle));
247 }
248
249 Status
250 AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
251 {
252 return SetStatus(DllExports::GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle));
253 }
254
255 Status
256 AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle)
257 {
258 return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
259 }
260
261 Status
263 {
264 return SetStatus(DllExports::GdipAddPathPolygonI(nativePath, points, count));
265 }
266
267 Status
269 {
270 return SetStatus(DllExports::GdipAddPathPolygon(nativePath, points, count));
271 }
272
273 Status
275 {
276 return SetStatus(DllExports::GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height));
277 }
278
279 Status
281 {
282 return SetStatus(DllExports::GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height));
283 }
284
285 Status
287 {
288 return SetStatus(DllExports::GdipAddPathRectanglesI(nativePath, rects, count));
289 }
290
291 Status
293 {
294 return SetStatus(DllExports::GdipAddPathRectangles(nativePath, rects, count));
295 }
296
297 Status
299 const WCHAR *string,
300 INT length,
301 const FontFamily *family,
302 INT style,
303 REAL emSize,
304 const Rect &layoutRect,
305 const StringFormat *format)
306 {
307 return SetStatus(DllExports::GdipAddPathStringI(
308 nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &layoutRect,
309 format ? getNat(format) : NULL));
310 }
311
312 Status
314 const WCHAR *string,
315 INT length,
316 const FontFamily *family,
317 INT style,
318 REAL emSize,
319 const PointF &origin,
320 const StringFormat *format)
321 {
322 RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
323 return SetStatus(DllExports::GdipAddPathString(
324 nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &rect,
325 format ? getNat(format) : NULL));
326 }
327
328 Status
330 const WCHAR *string,
331 INT length,
332 const FontFamily *family,
333 INT style,
334 REAL emSize,
335 const Point &origin,
336 const StringFormat *format)
337 {
338 Rect rect(origin.X, origin.Y, 0, 0);
339 return SetStatus(DllExports::GdipAddPathStringI(
340 nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &rect,
341 format ? getNat(format) : NULL));
342 }
343
344 Status
346 const WCHAR *string,
347 INT length,
348 const FontFamily *family,
349 INT style,
350 REAL emSize,
351 const RectF &layoutRect,
352 const StringFormat *format)
353 {
354 return SetStatus(DllExports::GdipAddPathString(
355 nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &layoutRect,
356 format ? getNat(format) : NULL));
357 }
358
359 Status
361 {
362 return SetStatus(DllExports::GdipClearPathMarkers(nativePath));
363 }
364
367 {
368 GpPath *clonepath = NULL;
369 SetStatus(DllExports::GdipClonePath(nativePath, &clonepath));
370 if (lastStatus != Ok)
371 return NULL;
372 return new GraphicsPath(clonepath);
373 }
374
375 Status
377 {
378 return SetStatus(DllExports::GdipClosePathFigures(nativePath));
379 }
380
381 Status
383 {
384 return SetStatus(DllExports::GdipClosePathFigure(nativePath));
385 }
386
387 Status
388 Flatten(const Matrix *matrix, REAL flatness)
389 {
390 GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL;
391 return SetStatus(DllExports::GdipFlattenPath(nativePath, nativeMatrix, flatness));
392 }
393
394 Status
395 GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen)
396 {
398 }
399
400 Status
401 GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen)
402 {
404 }
405
408 {
409 FillMode fillmode = FillModeAlternate;
410 SetStatus(DllExports::GdipGetPathFillMode(nativePath, &fillmode));
411 return fillmode;
412 }
413
414 Status
415 GetLastPoint(PointF *lastPoint) const
416 {
417 return SetStatus(DllExports::GdipGetPathLastPoint(nativePath, lastPoint));
418 }
419
420 Status
422 {
423 return lastStatus;
424 }
425
426 Status
428 {
429 return NotImplemented;
430 }
431
432 Status
434 {
435 return SetStatus(DllExports::GdipGetPathPointsI(nativePath, points, count));
436 }
437
438 Status
440 {
441 return SetStatus(DllExports::GdipGetPathPoints(nativePath, points, count));
442 }
443
444 Status
446 {
447 return SetStatus(DllExports::GdipGetPathTypes(nativePath, types, count));
448 }
449
450 INT
452 {
453 INT count = 0;
454 SetStatus(DllExports::GdipGetPointCount(nativePath, &count));
455 return count;
456 }
457
458 BOOL
459 IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) const
460 {
461 return IsOutlineVisible(point.X, point.Y, pen, g);
462 }
463
464 BOOL
465 IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) const
466 {
467 GpGraphics *nativeGraphics = g ? getNat(g) : NULL;
468 GpPen *nativePen = pen ? getNat(pen) : NULL;
469 BOOL flag = FALSE;
470 SetStatus(DllExports::GdipIsOutlineVisiblePathPoint(nativePath, x, y, nativePen, nativeGraphics, &flag));
471 return flag;
472 }
473
474 BOOL
475 IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) const
476 {
477 GpGraphics *nativeGraphics = g ? getNat(g) : NULL;
478 GpPen *nativePen = pen ? getNat(pen) : NULL;
479 BOOL flag = FALSE;
480 SetStatus(DllExports::GdipIsOutlineVisiblePathPointI(nativePath, x, y, nativePen, nativeGraphics, &flag));
481 return flag;
482 }
483
484 BOOL
485 IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) const
486 {
487 return IsOutlineVisible(point.X, point.Y, pen, g);
488 }
489
490 BOOL
491 IsVisible(REAL x, REAL y, const Graphics *g) const
492 {
493 GpGraphics *nativeGraphics = g ? getNat(g) : NULL;
494 BOOL flag = FALSE;
495 SetStatus(DllExports::GdipIsVisiblePathPoint(nativePath, x, y, nativeGraphics, &flag));
496 return flag;
497 }
498
499 BOOL
500 IsVisible(const PointF &point, const Graphics *g) const
501 {
502 return IsVisible(point.X, point.Y, g);
503 }
504
505 BOOL
506 IsVisible(INT x, INT y, const Graphics *g) const
507 {
508 GpGraphics *nativeGraphics = g ? getNat(g) : NULL;
509 BOOL flag = FALSE;
510 SetStatus(DllExports::GdipIsVisiblePathPointI(nativePath, x, y, nativeGraphics, &flag));
511 return flag;
512 }
513
514 BOOL
515 IsVisible(const Point &point, const Graphics *g) const
516 {
517 return IsVisible(point.X, point.Y, g);
518 }
519
520 Status
521 Outline(const Matrix *matrix, REAL flatness)
522 {
523 GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL;
524 return SetStatus(DllExports::GdipWindingModeOutline(nativePath, nativeMatrix, flatness));
525 }
526
527 Status
529 {
530 return SetStatus(DllExports::GdipResetPath(nativePath));
531 }
532
533 Status
535 {
536 return SetStatus(DllExports::GdipReversePath(nativePath));
537 }
538
539 Status
541 {
542 return SetStatus(DllExports::GdipSetPathFillMode(nativePath, fillmode));
543 }
544
545 Status
547 {
548 return SetStatus(DllExports::GdipSetPathMarker(nativePath));
549 }
550
551 Status
553 {
554 return SetStatus(DllExports::GdipStartPathFigure(nativePath));
555 }
556
557 Status
559 {
560 if (!matrix)
561 return Ok;
562 return SetStatus(DllExports::GdipTransformPath(nativePath, matrix->nativeMatrix));
563 }
564
565 Status
567 const PointF *destPoints,
568 INT count,
569 const RectF &srcRect,
570 const Matrix *matrix,
571 WarpMode warpMode,
572 REAL flatness)
573 {
574 GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL;
575 return SetStatus(DllExports::GdipWarpPath(
576 nativePath, nativeMatrix, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode,
577 flatness));
578 }
579
580 Status
581 Widen(const Pen *pen, const Matrix *matrix, REAL flatness)
582 {
584 }
585
586 protected:
589
591 {
592 }
593
595 {
596 }
597
598 Status
600 {
601 if (status != Ok)
603 return status;
604 }
605
606 void
608 {
610 }
611
612 private:
613 // GraphicsPath is not copyable
617
618 // get native
619 friend inline GpPath *&
621 {
622 return const_cast<GraphicsPath *>(path)->nativePath;
623 }
624};
625
627{
628 public:
630 {
631 GpPathIterator *it = NULL;
632 GpPath *nativePath = path ? getNat(path) : NULL;
633 lastStatus = DllExports::GdipCreatePathIter(&it, nativePath);
634 nativeIterator = it;
635 }
636
638 {
639 DllExports::GdipDeletePathIter(nativeIterator);
640 }
641
642 INT
643 CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex)
644 {
645 INT resultCount;
646 SetStatus(DllExports::GdipPathIterCopyData(nativeIterator, &resultCount, points, types, startIndex, endIndex));
647 return resultCount;
648 }
649
650 INT
652 {
653 INT resultCount;
654 SetStatus(DllExports::GdipPathIterEnumerate(nativeIterator, &resultCount, points, types, count));
655 return resultCount;
656 }
657
658 INT
659 GetCount() const
660 {
661 INT resultCount;
662 SetStatus(DllExports::GdipPathIterGetCount(nativeIterator, &resultCount));
663 return resultCount;
664 }
665
666 Status
668 {
669 return lastStatus;
670 }
671
672 INT
674 {
675 INT resultCount;
676 SetStatus(DllExports::GdipPathIterGetSubpathCount(nativeIterator, &resultCount));
677 return resultCount;
678 }
679
680 BOOL
681 HasCurve() const
682 {
683 BOOL hasCurve;
684 SetStatus(DllExports::GdipPathIterHasCurve(nativeIterator, &hasCurve));
685 return hasCurve;
686 }
687
688 INT
690 {
691 INT resultCount;
692 GpPath *nativePath = path ? getNat(path) : NULL;
693 SetStatus(DllExports::GdipPathIterNextMarkerPath(nativeIterator, &resultCount, nativePath));
694 return resultCount;
695 }
696
697 INT
698 NextMarker(INT *startIndex, INT *endIndex)
699 {
700 INT resultCount;
701 SetStatus(DllExports::GdipPathIterNextMarker(nativeIterator, &resultCount, startIndex, endIndex));
702 return resultCount;
703 }
704
705 INT
706 NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex)
707 {
708 INT resultCount;
709 SetStatus(DllExports::GdipPathIterNextPathType(nativeIterator, &resultCount, pathType, startIndex, endIndex));
710 return resultCount;
711 }
712
713 INT
715 {
716 GpPath *nativePath = path ? getNat(path) : NULL;
717 INT resultCount;
718 SetStatus(DllExports::GdipPathIterNextSubpathPath(nativeIterator, &resultCount, nativePath, isClosed));
719 return resultCount;
720 }
721
722 INT
723 NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed)
724 {
725 INT resultCount;
726 SetStatus(DllExports::GdipPathIterNextSubpath(nativeIterator, &resultCount, startIndex, endIndex, isClosed));
727 return resultCount;
728 }
729
730 VOID
732 {
733 SetStatus(DllExports::GdipPathIterRewind(nativeIterator));
734 }
735
736 protected:
739
740 Status
742 {
743 if (status != Ok)
745 return status;
746 }
747};
748
750{
751 public:
752 friend class Pen;
753
755 {
756 GpPathGradient *brush = NULL;
757 lastStatus = DllExports::GdipCreatePathGradientI(points, count, wrapMode, &brush);
758 SetNativeBrush(brush);
759 }
760
762 {
763 GpPathGradient *brush = NULL;
764 lastStatus = DllExports::GdipCreatePathGradient(points, count, wrapMode, &brush);
765 SetNativeBrush(brush);
766 }
767
769 {
770 GpPathGradient *brush = NULL;
771 lastStatus = DllExports::GdipCreatePathGradientFromPath(getNat(path), &brush);
772 SetNativeBrush(brush);
773 }
774
775 INT
777 {
778 INT count = 0;
779 SetStatus(DllExports::GdipGetPathGradientBlendCount(GetNativeGradient(), &count));
780 return count;
781 }
782
783 Status
784 GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) const
785 {
786 return SetStatus(
787 DllExports::GdipGetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count));
788 }
789
790 Status
792 {
793 if (color != NULL)
795
796 ARGB argb;
797 SetStatus(DllExports::GdipGetPathGradientCenterColor(GetNativeGradient(), &argb));
798 color->SetValue(argb);
799 return GetLastStatus();
800 }
801
802 Status
804 {
805 return SetStatus(DllExports::GdipGetPathGradientCenterPointI(GetNativeGradient(), point));
806 }
807
808 Status
810 {
811 return SetStatus(DllExports::GdipGetPathGradientCenterPoint(GetNativeGradient(), point));
812 }
813
814 Status
815 GetFocusScales(REAL *xScale, REAL *yScale) const
816 {
817 return SetStatus(DllExports::GdipGetPathGradientFocusScales(GetNativeGradient(), xScale, yScale));
818 }
819
820 BOOL
822 {
823 BOOL useGammaCorrection;
824 SetStatus(DllExports::GdipGetPathGradientGammaCorrection(GetNativeGradient(), &useGammaCorrection));
825 return useGammaCorrection;
826 }
827
828 Status
830 {
831 if (!path)
833
834 return SetStatus(DllExports::GdipGetPathGradientPath(GetNativeGradient(), getNat(path)));
835 }
836
837 INT
839 {
840 INT count = 0;
841 SetStatus(DllExports::GdipGetPathGradientPresetBlendCount(GetNativeGradient(), &count));
842 return count;
843 }
844
845 Status
846 GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const
847 {
848 return NotImplemented;
849 }
850
851 INT
853 {
854 INT count;
855 SetStatus(DllExports::GdipGetPathGradientPointCount(GetNativeGradient(), &count));
856 return count;
857 }
858
859 Status
861 {
862 return SetStatus(DllExports::GdipGetPathGradientRect(GetNativeGradient(), rect));
863 }
864
865 Status
867 {
868 return SetStatus(DllExports::GdipGetPathGradientRectI(GetNativeGradient(), rect));
869 }
870
871 INT
873 {
874 INT count;
875 SetStatus(DllExports::GdipGetPathGradientSurroundColorCount(GetNativeGradient(), &count));
876 return count;
877 }
878
879 Status
881 {
882 return NotImplemented;
883 }
884
885 Status
887 {
888 return SetStatus(DllExports::GdipGetPathGradientTransform(GetNativeGradient(), getNat(matrix)));
889 }
890
893 {
894 WrapMode wrapMode;
895 SetStatus(DllExports::GdipGetPathGradientWrapMode(GetNativeGradient(), &wrapMode));
896 return wrapMode;
897 }
898
899 Status
901 {
902 return SetStatus(DllExports::GdipMultiplyPathGradientTransform(GetNativeGradient(), getNat(matrix), order));
903 }
904
905 Status
907 {
908 return SetStatus(DllExports::GdipResetPathGradientTransform(GetNativeGradient()));
909 }
910
911 Status
913 {
914 return SetStatus(DllExports::GdipRotatePathGradientTransform(GetNativeGradient(), angle, order));
915 }
916
917 Status
919 {
920 return SetStatus(DllExports::GdipScalePathGradientTransform(GetNativeGradient(), sx, sy, order));
921 }
922
923 Status
924 SetBlend(REAL *blendFactors, REAL *blendPositions, INT count)
925 {
926 return SetStatus(
927 DllExports::GdipSetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count));
928 }
929
930 Status
932 {
933 return SetStatus(DllExports::GdipSetPathGradientSigmaBlend(GetNativeGradient(), focus, scale));
934 }
935
936 Status
938 {
939 return SetStatus(DllExports::GdipSetPathGradientLinearBlend(GetNativeGradient(), focus, scale));
940 }
941
942 Status
944 {
945 return SetStatus(DllExports::GdipSetPathGradientCenterColor(GetNativeGradient(), color.GetValue()));
946 }
947
948 Status
950 {
951 return SetStatus(DllExports::GdipSetPathGradientCenterPointI(GetNativeGradient(), const_cast<Point *>(&point)));
952 }
953
954 Status
956 {
957 return SetStatus(DllExports::GdipSetPathGradientCenterPoint(GetNativeGradient(), const_cast<PointF *>(&point)));
958 }
959
960 Status
961 SetFocusScales(REAL xScale, REAL yScale)
962 {
963 return SetStatus(DllExports::GdipSetPathGradientFocusScales(GetNativeGradient(), xScale, yScale));
964 }
965
966 Status
967 SetGammaCorrection(BOOL useGammaCorrection)
968 {
969 return SetStatus(DllExports::GdipSetPathGradientGammaCorrection(GetNativeGradient(), useGammaCorrection));
970 }
971
972 Status
974 {
975 if (!path)
977 return SetStatus(DllExports::GdipSetPathGradientPath(GetNativeGradient(), getNat(path)));
978 }
979
980 Status
981 SetInterpolationColors(const Color *presetColors, REAL *blendPositions, INT count)
982 {
983 return NotImplemented;
984 }
985
986 Status
988 {
989 return NotImplemented;
990 }
991
992 Status
994 {
995 return SetStatus(DllExports::GdipSetPathGradientTransform(GetNativeGradient(), getNat(matrix)));
996 }
997
998 Status
1000 {
1001 return SetStatus(DllExports::GdipSetPathGradientWrapMode(GetNativeGradient(), wrapMode));
1002 }
1003
1004 Status
1006 {
1007 return SetStatus(DllExports::GdipTranslatePathGradientTransform(GetNativeGradient(), dx, dy, order));
1008 }
1009
1010 protected:
1013 {
1014 return static_cast<GpPathGradient *>(nativeBrush);
1015 }
1016
1018 {
1019 }
1020};
1021
1022#endif /* _GDIPLUSPATH_H */
Arabic default style
Definition: afstyles.h:94
Status SetStatus(Status status) const
Definition: gdiplusbrush.h:76
friend GpBrush *& getNat(const Brush *brush)
Definition: gdiplusbrush.h:97
Status GetLastStatus() const
Definition: gdiplusbrush.h:50
Status lastStatus
Definition: gdiplusbrush.h:65
GpBrush * nativeBrush
Definition: gdiplusbrush.h:64
void SetNativeBrush(GpBrush *brush)
Definition: gdiplusbrush.h:84
Status SetStatus(Status status) const
Definition: gdipluspath.h:741
INT NextSubpath(GraphicsPath *path, BOOL *isClosed)
Definition: gdipluspath.h:714
INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex)
Definition: gdipluspath.h:706
GraphicsPathIterator(GraphicsPath *path)
Definition: gdipluspath.h:629
Status GetLastStatus() const
Definition: gdipluspath.h:667
INT Enumerate(PointF *points, BYTE *types, INT count)
Definition: gdipluspath.h:651
INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex)
Definition: gdipluspath.h:643
INT NextMarker(INT *startIndex, INT *endIndex)
Definition: gdipluspath.h:698
INT NextMarker(GraphicsPath *path)
Definition: gdipluspath.h:689
INT GetSubpathCount() const
Definition: gdipluspath.h:673
INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed)
Definition: gdipluspath.h:723
BOOL HasCurve() const
Definition: gdipluspath.h:681
INT GetCount() const
Definition: gdipluspath.h:659
GpPathIterator * nativeIterator
Definition: gdipluspath.h:737
Status AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:51
Status AddCurve(const Point *points, INT count)
Definition: gdipluspath.h:135
Status AddPath(const GraphicsPath *addingPath, BOOL connect)
Definition: gdipluspath.h:231
Status AddLine(const Point &pt1, const Point &pt2)
Definition: gdipluspath.h:195
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const PointF &origin, const StringFormat *format)
Definition: gdipluspath.h:313
Status AddClosedCurve(const Point *points, INT count, REAL tension)
Definition: gdipluspath.h:117
Status AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension)
Definition: gdipluspath.h:153
BOOL IsVisible(const PointF &point, const Graphics *g) const
Definition: gdipluspath.h:500
GraphicsPath & operator=(const GraphicsPath &)
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Point &origin, const StringFormat *format)
Definition: gdipluspath.h:329
Status AddCurve(const PointF *points, INT count)
Definition: gdipluspath.h:147
Status GetLastStatus() const
Definition: gdipluspath.h:421
Status AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
Definition: gdipluspath.h:93
Status AddLines(const Point *points, INT count)
Definition: gdipluspath.h:219
Status AddCurve(const PointF *points, INT count, REAL tension)
Definition: gdipluspath.h:141
Status AddLine(INT x1, INT y1, INT x2, INT y2)
Definition: gdipluspath.h:213
Status Widen(const Pen *pen, const Matrix *matrix, REAL flatness)
Definition: gdipluspath.h:581
Status AddPolygon(const PointF *points, INT count)
Definition: gdipluspath.h:268
GraphicsPath(FillMode fillMode=FillModeAlternate)
Definition: gdipluspath.h:34
BOOL IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) const
Definition: gdipluspath.h:485
Status AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:256
Status AddRectangle(const RectF &rect)
Definition: gdipluspath.h:280
Status AddBeziers(const Point *points, INT count)
Definition: gdipluspath.h:99
Status AddRectangles(const Rect *rects, INT count)
Definition: gdipluspath.h:286
Status AddLines(const PointF *points, INT count)
Definition: gdipluspath.h:225
Status ClearMarkers()
Definition: gdipluspath.h:360
GpPath * nativePath
Definition: gdipluspath.h:587
Status Transform(const Matrix *matrix)
Definition: gdipluspath.h:558
Status AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
Definition: gdipluspath.h:165
FillMode GetFillMode()
Definition: gdipluspath.h:407
Status AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:238
BOOL IsVisible(INT x, INT y, const Graphics *g) const
Definition: gdipluspath.h:506
Status AddClosedCurve(const Point *points, INT count)
Definition: gdipluspath.h:111
BOOL IsVisible(REAL x, REAL y, const Graphics *g) const
Definition: gdipluspath.h:491
Status AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:57
Status AddEllipse(INT x, INT y, INT width, INT height)
Definition: gdipluspath.h:183
Status AddEllipse(const RectF &rect)
Definition: gdipluspath.h:177
Status Reverse()
Definition: gdipluspath.h:534
BOOL IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) const
Definition: gdipluspath.h:459
Status AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
Definition: gdipluspath.h:75
Status SetMarker()
Definition: gdipluspath.h:546
GraphicsPath * Clone()
Definition: gdipluspath.h:366
Status SetStatus(Status status) const
Definition: gdipluspath.h:599
BOOL IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) const
Definition: gdipluspath.h:465
Status AddCurve(const Point *points, INT count, REAL tension)
Definition: gdipluspath.h:159
Status AddRectangles(const RectF *rects, INT count)
Definition: gdipluspath.h:292
Status GetPathData(PathData *pathData)
Definition: gdipluspath.h:427
Status GetLastPoint(PointF *lastPoint) const
Definition: gdipluspath.h:415
Status AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:244
Status AddEllipse(const Rect &rect)
Definition: gdipluspath.h:171
GraphicsPath(GpPath *path)
Definition: gdipluspath.h:594
Status AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:63
Status Reset()
Definition: gdipluspath.h:528
friend GpPath *& getNat(const GraphicsPath *path)
Definition: gdipluspath.h:620
INT GetPointCount() const
Definition: gdipluspath.h:451
Status CloseFigure()
Definition: gdipluspath.h:382
Status AddRectangle(const Rect &rect)
Definition: gdipluspath.h:274
Status CloseAllFigures()
Definition: gdipluspath.h:376
Status Warp(const PointF *destPoints, INT count, const RectF &srcRect, const Matrix *matrix, WarpMode warpMode, REAL flatness)
Definition: gdipluspath.h:566
Status SetFillMode(FillMode fillmode)
Definition: gdipluspath.h:540
Status GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen)
Definition: gdipluspath.h:401
Status Outline(const Matrix *matrix, REAL flatness)
Definition: gdipluspath.h:521
Status AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:250
void SetNativePath(GpPath *path)
Definition: gdipluspath.h:607
GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode)
Definition: gdipluspath.h:29
Status AddBeziers(const PointF *points, INT count)
Definition: gdipluspath.h:105
Status StartFigure()
Definition: gdipluspath.h:552
Status GetPathPoints(PointF *points, INT count) const
Definition: gdipluspath.h:439
Status GetPathTypes(BYTE *types, INT count) const
Definition: gdipluspath.h:445
Status AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Definition: gdipluspath.h:69
Status AddClosedCurve(const PointF *points, INT count)
Definition: gdipluspath.h:129
Status AddLine(const PointF &pt1, const PointF &pt2)
Definition: gdipluspath.h:201
Status GetPathPoints(Point *points, INT count) const
Definition: gdipluspath.h:433
Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
Definition: gdipluspath.h:81
Status lastStatus
Definition: gdipluspath.h:588
Status AddClosedCurve(const PointF *points, INT count, REAL tension)
Definition: gdipluspath.h:123
BOOL IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) const
Definition: gdipluspath.h:475
Status GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen)
Definition: gdipluspath.h:395
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Rect &layoutRect, const StringFormat *format)
Definition: gdipluspath.h:298
Status Flatten(const Matrix *matrix, REAL flatness)
Definition: gdipluspath.h:388
Status AddEllipse(REAL x, REAL y, REAL width, REAL height)
Definition: gdipluspath.h:189
Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2)
Definition: gdipluspath.h:207
GraphicsPath(const GraphicsPath &)
BOOL IsVisible(const Point &point, const Graphics *g) const
Definition: gdipluspath.h:515
Status AddPolygon(const Point *points, INT count)
Definition: gdipluspath.h:262
GraphicsPath(const PointF *points, const BYTE *types, INT count, FillMode fillMode=FillModeAlternate)
Definition: gdipluspath.h:39
Status AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
Definition: gdipluspath.h:87
Status AddString(const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const RectF &layoutRect, const StringFormat *format)
Definition: gdipluspath.h:345
Status GetRectangle(RectF *rect) const
Definition: gdipluspath.h:860
Status GetTransform(Matrix *matrix) const
Definition: gdipluspath.h:886
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order=MatrixOrderPrepend)
Definition: gdipluspath.h:1005
Status MultiplyTransform(Matrix *matrix, MatrixOrder order=MatrixOrderPrepend)
Definition: gdipluspath.h:900
Status GetCenterPoint(Point *point) const
Definition: gdipluspath.h:803
Status GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) const
Definition: gdipluspath.h:784
Status SetInterpolationColors(const Color *presetColors, REAL *blendPositions, INT count)
Definition: gdipluspath.h:981
Status SetCenterColor(const Color &color)
Definition: gdipluspath.h:943
INT GetBlendCount() const
Definition: gdipluspath.h:776
PathGradientBrush(const Point *points, INT count, WrapMode wrapMode=WrapModeClamp)
Definition: gdipluspath.h:754
Status GetRectangle(Rect *rect) const
Definition: gdipluspath.h:866
GpPathGradient * GetNativeGradient() const
Definition: gdipluspath.h:1012
PathGradientBrush(const PointF *points, INT count, WrapMode wrapMode=WrapModeClamp)
Definition: gdipluspath.h:761
Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count)
Definition: gdipluspath.h:924
INT GetInterpolationColorCount() const
Definition: gdipluspath.h:838
Status RotateTransform(REAL angle, MatrixOrder order=MatrixOrderPrepend)
Definition: gdipluspath.h:912
Status SetTransform(const Matrix *matrix)
Definition: gdipluspath.h:993
Status SetWrapMode(WrapMode wrapMode)
Definition: gdipluspath.h:999
Status GetCenterPoint(PointF *point) const
Definition: gdipluspath.h:809
Status ResetTransform()
Definition: gdipluspath.h:906
INT GetSurroundColorCount() const
Definition: gdipluspath.h:872
WrapMode GetWrapMode() const
Definition: gdipluspath.h:892
PathGradientBrush(const GraphicsPath *path)
Definition: gdipluspath.h:768
Status SetBlendTriangularShape(REAL focus, REAL scale=1.0f)
Definition: gdipluspath.h:937
Status GetGraphicsPath(GraphicsPath *path) const
Definition: gdipluspath.h:829
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order=MatrixOrderPrepend)
Definition: gdipluspath.h:918
Status SetGammaCorrection(BOOL useGammaCorrection)
Definition: gdipluspath.h:967
Status SetFocusScales(REAL xScale, REAL yScale)
Definition: gdipluspath.h:961
Status GetCenterColor(Color *color) const
Definition: gdipluspath.h:791
Status SetBlendBellShape(REAL focus, REAL scale)
Definition: gdipluspath.h:931
BOOL GetGammaCorrection() const
Definition: gdipluspath.h:821
Status SetSurroundColors(const Color *colors, INT *count)
Definition: gdipluspath.h:987
Status GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const
Definition: gdipluspath.h:846
Status GetSurroundColors(Color *colors, INT *count) const
Definition: gdipluspath.h:880
Status SetCenterPoint(const Point &point)
Definition: gdipluspath.h:949
INT GetPointCount() const
Definition: gdipluspath.h:852
Status SetCenterPoint(const PointF &point)
Definition: gdipluspath.h:955
Status GetFocusScales(REAL *xScale, REAL *yScale) const
Definition: gdipluspath.h:815
Status SetGraphicsPath(const GraphicsPath *path)
Definition: gdipluspath.h:973
Definition: gdipluspen.h:23
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
float REAL
Definition: types.h:41
POINTL point
Definition: edittest.c:50
unsigned int BOOL
Definition: ntddk_ex.h:94
GpBrush *& getNat(const Brush *brush)
Definition: gdiplusbrush.h:97
FillMode
Definition: gdiplusenums.h:54
@ FillModeAlternate
Definition: gdiplusenums.h:55
WarpMode
Definition: gdiplusenums.h:200
WrapMode
Definition: gdiplusenums.h:206
@ WrapModeClamp
Definition: gdiplusenums.h:211
MatrixOrder
Definition: gdiplusenums.h:187
@ MatrixOrderPrepend
Definition: gdiplusenums.h:188
DWORD ARGB
Status
Definition: gdiplustypes.h:25
@ Ok
Definition: gdiplustypes.h:26
@ InvalidParameter
Definition: gdiplustypes.h:28
@ NotImplemented
Definition: gdiplustypes.h:32
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 GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
GLuint color
Definition: glext.h:6243
GLuint GLenum matrix
Definition: glext.h:9407
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
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
& 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
Definition: ps.c:97
Definition: cmds.c:130
int32_t INT
Definition: typedefs.h:58
_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
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193