Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023/* * GdiPlusPath.h * * Windows GDI+ * * This file is part of the w32api package. * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */
#ifndef _GDIPLUSPATH_H#define _GDIPLUSPATH_H
class GraphicsPath : public GdiplusBase{ friend class Region; friend class CustomLineCap; friend class Graphics;
public: GraphicsPath(const Point *points, const BYTE *types, INT count, FillMode fillMode) : nativePath(NULL) { lastStatus = DllExports::GdipCreatePath2I(points, types, count, fillMode, &nativePath); }
GraphicsPath(FillMode fillMode = FillModeAlternate) : nativePath(NULL) { lastStatus = DllExports::GdipCreatePath(fillMode, &nativePath); }
GraphicsPath(const PointF *points, const BYTE *types, INT count, FillMode fillMode = FillModeAlternate) : nativePath(NULL) { lastStatus = DllExports::GdipCreatePath2(points, types, count, fillMode, &nativePath); }
~GraphicsPath() { DllExports::GdipDeletePath(nativePath); }
Status AddArc(const Rect &rect, REAL startAngle, REAL sweepAngle) { return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); }
Status AddArc(const RectF &rect, REAL startAngle, REAL sweepAngle) { return AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); }
Status AddArc(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) { return SetStatus(DllExports::GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle)); }
Status AddArc(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { return SetStatus(DllExports::GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle)); }
Status AddBezier(const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4) { return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); }
Status AddBezier(REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { return SetStatus(DllExports::GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); }
Status AddBezier(const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4) { return AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); }
Status AddBezier(INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) { return SetStatus(DllExports::GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); }
Status AddBeziers(const Point *points, INT count) { return SetStatus(DllExports::GdipAddPathBeziersI(nativePath, points, count)); }
Status AddBeziers(const PointF *points, INT count) { return SetStatus(DllExports::GdipAddPathBeziers(nativePath, points, count)); }
Status AddClosedCurve(const Point *points, INT count) { return SetStatus(DllExports::GdipAddPathClosedCurveI(nativePath, points, count)); }
Status AddClosedCurve(const Point *points, INT count, REAL tension) { return SetStatus(DllExports::GdipAddPathClosedCurve2I(nativePath, points, count, tension)); }
Status AddClosedCurve(const PointF *points, INT count, REAL tension) { return SetStatus(DllExports::GdipAddPathClosedCurve2(nativePath, points, count, tension)); }
Status AddClosedCurve(const PointF *points, INT count) { return SetStatus(DllExports::GdipAddPathClosedCurve(nativePath, points, count)); }
Status AddCurve(const Point *points, INT count) { return SetStatus(DllExports::GdipAddPathCurveI(nativePath, points, count)); }
Status AddCurve(const PointF *points, INT count, REAL tension) { return SetStatus(DllExports::GdipAddPathCurve2(nativePath, points, count, tension)); }
Status AddCurve(const PointF *points, INT count) { return SetStatus(DllExports::GdipAddPathCurve(nativePath, points, count)); }
Status AddCurve(const Point *points, INT count, INT offset, INT numberOfSegments, REAL tension) { return SetStatus(DllExports::GdipAddPathCurve3I(nativePath, points, count, offset, numberOfSegments, tension)); }
Status AddCurve(const Point *points, INT count, REAL tension) { return SetStatus(DllExports::GdipAddPathCurve2I(nativePath, points, count, tension)); }
Status AddCurve(const PointF *points, INT count, INT offset, INT numberOfSegments, REAL tension) { return SetStatus(DllExports::GdipAddPathCurve3(nativePath, points, count, offset, numberOfSegments, tension)); }
Status AddEllipse(const Rect &rect) { return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); }
Status AddEllipse(const RectF &rect) { return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); }
Status AddEllipse(INT x, INT y, INT width, INT height) { return SetStatus(DllExports::GdipAddPathEllipseI(nativePath, x, y, width, height)); }
Status AddEllipse(REAL x, REAL y, REAL width, REAL height) { return SetStatus(DllExports::GdipAddPathEllipse(nativePath, x, y, width, height)); }
Status AddLine(const Point &pt1, const Point &pt2) { return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); }
Status AddLine(const PointF &pt1, const PointF &pt2) { return AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); }
Status AddLine(REAL x1, REAL y1, REAL x2, REAL y2) { return SetStatus(DllExports::GdipAddPathLine(nativePath, x1, y1, x2, y2)); }
Status AddLine(INT x1, INT y1, INT x2, INT y2) { return SetStatus(DllExports::GdipAddPathLineI(nativePath, x1, y1, x2, y2)); }
Status AddLines(const Point *points, INT count) { return SetStatus(DllExports::GdipAddPathLine2I(nativePath, points, count)); }
Status AddLines(const PointF *points, INT count) { return SetStatus(DllExports::GdipAddPathLine2(nativePath, points, count)); }
Status AddPath(const GraphicsPath *addingPath, BOOL connect) { GpPath *nativePath2 = addingPath ? getNat(addingPath) : NULL; return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2, connect)); }
Status AddPie(const Rect &rect, REAL startAngle, REAL sweepAngle) { return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); }
Status AddPie(INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) { return SetStatus(DllExports::GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle)); }
Status AddPie(REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { return SetStatus(DllExports::GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle)); }
Status AddPie(const RectF &rect, REAL startAngle, REAL sweepAngle) { return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); }
Status AddPolygon(const Point *points, INT count) { return SetStatus(DllExports::GdipAddPathPolygonI(nativePath, points, count)); }
Status AddPolygon(const PointF *points, INT count) { return SetStatus(DllExports::GdipAddPathPolygon(nativePath, points, count)); }
Status AddRectangle(const Rect &rect) { return SetStatus(DllExports::GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height)); }
Status AddRectangle(const RectF &rect) { return SetStatus(DllExports::GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height)); }
Status AddRectangles(const Rect *rects, INT count) { return SetStatus(DllExports::GdipAddPathRectanglesI(nativePath, rects, count)); }
Status AddRectangles(const RectF *rects, INT count) { return SetStatus(DllExports::GdipAddPathRectangles(nativePath, rects, count)); }
Status AddString( const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Rect &layoutRect, const StringFormat *format) { return SetStatus(DllExports::GdipAddPathStringI( nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &layoutRect, format ? getNat(format) : NULL)); }
Status AddString( const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const PointF &origin, const StringFormat *format) { RectF rect(origin.X, origin.Y, 0.0f, 0.0f); return SetStatus(DllExports::GdipAddPathString( nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &rect, format ? getNat(format) : NULL)); }
Status AddString( const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const Point &origin, const StringFormat *format) { Rect rect(origin.X, origin.Y, 0, 0); return SetStatus(DllExports::GdipAddPathStringI( nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &rect, format ? getNat(format) : NULL)); }
Status AddString( const WCHAR *string, INT length, const FontFamily *family, INT style, REAL emSize, const RectF &layoutRect, const StringFormat *format) { return SetStatus(DllExports::GdipAddPathString( nativePath, string, length, family ? getNat(family) : NULL, style, emSize, &layoutRect, format ? getNat(format) : NULL)); }
Status ClearMarkers() { return SetStatus(DllExports::GdipClearPathMarkers(nativePath)); }
GraphicsPath * Clone() { GpPath *clonepath = NULL; SetStatus(DllExports::GdipClonePath(nativePath, &clonepath)); if (lastStatus != Ok) return NULL; return new GraphicsPath(clonepath); }
Status CloseAllFigures() { return SetStatus(DllExports::GdipClosePathFigures(nativePath)); }
Status CloseFigure() { return SetStatus(DllExports::GdipClosePathFigure(nativePath)); }
Status Flatten(const Matrix *matrix, REAL flatness) { GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; return SetStatus(DllExports::GdipFlattenPath(nativePath, nativeMatrix, flatness)); }
Status GetBounds(Rect *bounds, const Matrix *matrix, const Pen *pen) { return SetStatus(NotImplemented); }
Status GetBounds(RectF *bounds, const Matrix *matrix, const Pen *pen) { return SetStatus(NotImplemented); }
FillMode GetFillMode() { FillMode fillmode = FillModeAlternate; SetStatus(DllExports::GdipGetPathFillMode(nativePath, &fillmode)); return fillmode; }
Status GetLastPoint(PointF *lastPoint) const { return SetStatus(DllExports::GdipGetPathLastPoint(nativePath, lastPoint)); }
Status GetLastStatus() const { return lastStatus; }
Status GetPathData(PathData *pathData) { return NotImplemented; }
Status GetPathPoints(Point *points, INT count) const { return SetStatus(DllExports::GdipGetPathPointsI(nativePath, points, count)); }
Status GetPathPoints(PointF *points, INT count) const { return SetStatus(DllExports::GdipGetPathPoints(nativePath, points, count)); }
Status GetPathTypes(BYTE *types, INT count) const { return SetStatus(DllExports::GdipGetPathTypes(nativePath, types, count)); }
INT GetPointCount() const { INT count = 0; SetStatus(DllExports::GdipGetPointCount(nativePath, &count)); return count; }
BOOL IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) const { return IsOutlineVisible(point.X, point.Y, pen, g); }
BOOL IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) const { GpGraphics *nativeGraphics = g ? getNat(g) : NULL; GpPen *nativePen = pen ? getNat(pen) : NULL; BOOL flag = FALSE; SetStatus(DllExports::GdipIsOutlineVisiblePathPoint(nativePath, x, y, nativePen, nativeGraphics, &flag)); return flag; }
BOOL IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) const { GpGraphics *nativeGraphics = g ? getNat(g) : NULL; GpPen *nativePen = pen ? getNat(pen) : NULL; BOOL flag = FALSE; SetStatus(DllExports::GdipIsOutlineVisiblePathPointI(nativePath, x, y, nativePen, nativeGraphics, &flag)); return flag; }
BOOL IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) const { return IsOutlineVisible(point.X, point.Y, pen, g); }
BOOL IsVisible(REAL x, REAL y, const Graphics *g) const { GpGraphics *nativeGraphics = g ? getNat(g) : NULL; BOOL flag = FALSE; SetStatus(DllExports::GdipIsVisiblePathPoint(nativePath, x, y, nativeGraphics, &flag)); return flag; }
BOOL IsVisible(const PointF &point, const Graphics *g) const { return IsVisible(point.X, point.Y, g); }
BOOL IsVisible(INT x, INT y, const Graphics *g) const { GpGraphics *nativeGraphics = g ? getNat(g) : NULL; BOOL flag = FALSE; SetStatus(DllExports::GdipIsVisiblePathPointI(nativePath, x, y, nativeGraphics, &flag)); return flag; }
BOOL IsVisible(const Point &point, const Graphics *g) const { return IsVisible(point.X, point.Y, g); }
Status Outline(const Matrix *matrix, REAL flatness) { GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; return SetStatus(DllExports::GdipWindingModeOutline(nativePath, nativeMatrix, flatness)); }
Status Reset() { return SetStatus(DllExports::GdipResetPath(nativePath)); }
Status Reverse() { return SetStatus(DllExports::GdipReversePath(nativePath)); }
Status SetFillMode(FillMode fillmode) { return SetStatus(DllExports::GdipSetPathFillMode(nativePath, fillmode)); }
Status SetMarker() { return SetStatus(DllExports::GdipSetPathMarker(nativePath)); }
Status StartFigure() { return SetStatus(DllExports::GdipStartPathFigure(nativePath)); }
Status Transform(const Matrix *matrix) { if (!matrix) return Ok; return SetStatus(DllExports::GdipTransformPath(nativePath, matrix->nativeMatrix)); }
Status Warp( const PointF *destPoints, INT count, const RectF &srcRect, const Matrix *matrix, WarpMode warpMode, REAL flatness) { GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; return SetStatus(DllExports::GdipWarpPath( nativePath, nativeMatrix, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, flatness)); }
Status Widen(const Pen *pen, const Matrix *matrix, REAL flatness) { return SetStatus(NotImplemented); }
protected: GpPath *nativePath; mutable Status lastStatus;
GraphicsPath() { }
GraphicsPath(GpPath *path) : nativePath(path), lastStatus(Ok) { }
Status SetStatus(Status status) const { if (status != Ok) lastStatus = status; return status; }
void SetNativePath(GpPath *path) { nativePath = path; }
private: // GraphicsPath is not copyable GraphicsPath(const GraphicsPath &); GraphicsPath & operator=(const GraphicsPath &);
// get native friend inline GpPath *& getNat(const GraphicsPath *path) { return const_cast<GraphicsPath *>(path)->nativePath; }};
class GraphicsPathIterator : public GdiplusBase{ public: GraphicsPathIterator(GraphicsPath *path) { GpPathIterator *it = NULL; GpPath *nativePath = path ? getNat(path) : NULL; lastStatus = DllExports::GdipCreatePathIter(&it, nativePath); nativeIterator = it; }
~GraphicsPathIterator() { DllExports::GdipDeletePathIter(nativeIterator); }
INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex) { INT resultCount; SetStatus(DllExports::GdipPathIterCopyData(nativeIterator, &resultCount, points, types, startIndex, endIndex)); return resultCount; }
INT Enumerate(PointF *points, BYTE *types, INT count) { INT resultCount; SetStatus(DllExports::GdipPathIterEnumerate(nativeIterator, &resultCount, points, types, count)); return resultCount; }
INT GetCount() const { INT resultCount; SetStatus(DllExports::GdipPathIterGetCount(nativeIterator, &resultCount)); return resultCount; }
Status GetLastStatus() const { return lastStatus; }
INT GetSubpathCount() const { INT resultCount; SetStatus(DllExports::GdipPathIterGetSubpathCount(nativeIterator, &resultCount)); return resultCount; }
BOOL HasCurve() const { BOOL hasCurve; SetStatus(DllExports::GdipPathIterHasCurve(nativeIterator, &hasCurve)); return hasCurve; }
INT NextMarker(GraphicsPath *path) { INT resultCount; GpPath *nativePath = path ? getNat(path) : NULL; SetStatus(DllExports::GdipPathIterNextMarkerPath(nativeIterator, &resultCount, nativePath)); return resultCount; }
INT NextMarker(INT *startIndex, INT *endIndex) { INT resultCount; SetStatus(DllExports::GdipPathIterNextMarker(nativeIterator, &resultCount, startIndex, endIndex)); return resultCount; }
INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex) { INT resultCount; SetStatus(DllExports::GdipPathIterNextPathType(nativeIterator, &resultCount, pathType, startIndex, endIndex)); return resultCount; }
INT NextSubpath(GraphicsPath *path, BOOL *isClosed) { GpPath *nativePath = path ? getNat(path) : NULL; INT resultCount; SetStatus(DllExports::GdipPathIterNextSubpathPath(nativeIterator, &resultCount, nativePath, isClosed)); return resultCount; }
INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed) { INT resultCount; SetStatus(DllExports::GdipPathIterNextSubpath(nativeIterator, &resultCount, startIndex, endIndex, isClosed)); return resultCount; }
VOID Rewind() { SetStatus(DllExports::GdipPathIterRewind(nativeIterator)); }
protected: GpPathIterator *nativeIterator; mutable Status lastStatus;
Status SetStatus(Status status) const { if (status != Ok) lastStatus = status; return status; }};
class PathGradientBrush : public Brush{ public: friend class Pen;
PathGradientBrush(const Point *points, INT count, WrapMode wrapMode = WrapModeClamp) { GpPathGradient *brush = NULL; lastStatus = DllExports::GdipCreatePathGradientI(points, count, wrapMode, &brush); SetNativeBrush(brush); }
PathGradientBrush(const PointF *points, INT count, WrapMode wrapMode = WrapModeClamp) { GpPathGradient *brush = NULL; lastStatus = DllExports::GdipCreatePathGradient(points, count, wrapMode, &brush); SetNativeBrush(brush); }
PathGradientBrush(const GraphicsPath *path) { GpPathGradient *brush = NULL; lastStatus = DllExports::GdipCreatePathGradientFromPath(getNat(path), &brush); SetNativeBrush(brush); }
INT GetBlendCount() const { INT count = 0; SetStatus(DllExports::GdipGetPathGradientBlendCount(GetNativeGradient(), &count)); return count; }
Status GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) const { return SetStatus( DllExports::GdipGetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count)); }
Status GetCenterColor(Color *color) const { if (color != NULL) return SetStatus(InvalidParameter);
ARGB argb; SetStatus(DllExports::GdipGetPathGradientCenterColor(GetNativeGradient(), &argb)); color->SetValue(argb); return GetLastStatus(); }
Status GetCenterPoint(Point *point) const { return SetStatus(DllExports::GdipGetPathGradientCenterPointI(GetNativeGradient(), point)); }
Status GetCenterPoint(PointF *point) const { return SetStatus(DllExports::GdipGetPathGradientCenterPoint(GetNativeGradient(), point)); }
Status GetFocusScales(REAL *xScale, REAL *yScale) const { return SetStatus(DllExports::GdipGetPathGradientFocusScales(GetNativeGradient(), xScale, yScale)); }
BOOL GetGammaCorrection() const { BOOL useGammaCorrection; SetStatus(DllExports::GdipGetPathGradientGammaCorrection(GetNativeGradient(), &useGammaCorrection)); return useGammaCorrection; }
Status GetGraphicsPath(GraphicsPath *path) const { if (!path) return SetStatus(InvalidParameter);
return SetStatus(DllExports::GdipGetPathGradientPath(GetNativeGradient(), getNat(path))); }
INT GetInterpolationColorCount() const { INT count = 0; SetStatus(DllExports::GdipGetPathGradientPresetBlendCount(GetNativeGradient(), &count)); return count; }
Status GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const { return NotImplemented; }
INT GetPointCount() const { INT count; SetStatus(DllExports::GdipGetPathGradientPointCount(GetNativeGradient(), &count)); return count; }
Status GetRectangle(RectF *rect) const { return SetStatus(DllExports::GdipGetPathGradientRect(GetNativeGradient(), rect)); }
Status GetRectangle(Rect *rect) const { return SetStatus(DllExports::GdipGetPathGradientRectI(GetNativeGradient(), rect)); }
INT GetSurroundColorCount() const { INT count; SetStatus(DllExports::GdipGetPathGradientSurroundColorCount(GetNativeGradient(), &count)); return count; }
Status GetSurroundColors(Color *colors, INT *count) const { return NotImplemented; }
Status GetTransform(Matrix *matrix) const { return SetStatus(DllExports::GdipGetPathGradientTransform(GetNativeGradient(), getNat(matrix))); }
WrapMode GetWrapMode() const { WrapMode wrapMode; SetStatus(DllExports::GdipGetPathGradientWrapMode(GetNativeGradient(), &wrapMode)); return wrapMode; }
Status MultiplyTransform(Matrix *matrix, MatrixOrder order = MatrixOrderPrepend) { return SetStatus(DllExports::GdipMultiplyPathGradientTransform(GetNativeGradient(), getNat(matrix), order)); }
Status ResetTransform() { return SetStatus(DllExports::GdipResetPathGradientTransform(GetNativeGradient())); }
Status RotateTransform(REAL angle, MatrixOrder order = MatrixOrderPrepend) { return SetStatus(DllExports::GdipRotatePathGradientTransform(GetNativeGradient(), angle, order)); }
Status ScaleTransform(REAL sx, REAL sy, MatrixOrder order = MatrixOrderPrepend) { return SetStatus(DllExports::GdipScalePathGradientTransform(GetNativeGradient(), sx, sy, order)); }
Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count) { return SetStatus( DllExports::GdipSetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count)); }
Status SetBlendBellShape(REAL focus, REAL scale) { return SetStatus(DllExports::GdipSetPathGradientSigmaBlend(GetNativeGradient(), focus, scale)); }
Status SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) { return SetStatus(DllExports::GdipSetPathGradientLinearBlend(GetNativeGradient(), focus, scale)); }
Status SetCenterColor(const Color &color) { return SetStatus(DllExports::GdipSetPathGradientCenterColor(GetNativeGradient(), color.GetValue())); }
Status SetCenterPoint(const Point &point) { return SetStatus(DllExports::GdipSetPathGradientCenterPointI(GetNativeGradient(), const_cast<Point *>(&point))); }
Status SetCenterPoint(const PointF &point) { return SetStatus(DllExports::GdipSetPathGradientCenterPoint(GetNativeGradient(), const_cast<PointF *>(&point))); }
Status SetFocusScales(REAL xScale, REAL yScale) { return SetStatus(DllExports::GdipSetPathGradientFocusScales(GetNativeGradient(), xScale, yScale)); }
Status SetGammaCorrection(BOOL useGammaCorrection) { return SetStatus(DllExports::GdipSetPathGradientGammaCorrection(GetNativeGradient(), useGammaCorrection)); }
Status SetGraphicsPath(const GraphicsPath *path) { if (!path) return SetStatus(InvalidParameter); return SetStatus(DllExports::GdipSetPathGradientPath(GetNativeGradient(), getNat(path))); }
Status SetInterpolationColors(const Color *presetColors, REAL *blendPositions, INT count) { return NotImplemented; }
Status SetSurroundColors(const Color *colors, INT *count) { return NotImplemented; }
Status SetTransform(const Matrix *matrix) { return SetStatus(DllExports::GdipSetPathGradientTransform(GetNativeGradient(), getNat(matrix))); }
Status SetWrapMode(WrapMode wrapMode) { return SetStatus(DllExports::GdipSetPathGradientWrapMode(GetNativeGradient(), wrapMode)); }
Status TranslateTransform(REAL dx, REAL dy, MatrixOrder order = MatrixOrderPrepend) { return SetStatus(DllExports::GdipTranslatePathGradientTransform(GetNativeGradient(), dx, dy, order)); }
protected: GpPathGradient * GetNativeGradient() const { return static_cast<GpPathGradient *>(nativeBrush); }
PathGradientBrush() { }};
#endif /* _GDIPLUSPATH_H */