System::Drawing::Drawing2D::GraphicsPath Class Reference

Inherits System::Object.

Public Member Functions

 GraphicsPath (FillMode fillMode=FillMode::Alternate)
 
 GraphicsPath (const ArrayPtr< Point > &pts, const ArrayPtr< uint8_t > &types, FillMode fillMode=FillMode::Alternate)
 
 GraphicsPath (const ArrayPtr< PointF > &pts, const ArrayPtr< uint8_t > &types, FillMode fillMode=FillMode::Alternate)
 
 GraphicsPath (const SkPath &path)
 
 ~GraphicsPath ()
 Destructor. More...
 
SharedPtr< PathDataget_PathData ()
 
ArrayPtr< uint8_t > get_PathTypes () const
 
ArrayPtr< PointFget_PathPoints () const
 Returns an array that contains points that make up a path represented by the current object. More...
 
int get_PointCount () const
 Returns the number of points in the path represented by the current object. More...
 
void Reverse ()
 Reverses the order of points in the PathPoints array of this GraphicsPath. More...
 
FillMode get_FillMode ()
 Returns the fill mode of the current object. More...
 
void set_FillMode (FillMode mode)
 
void AddBezier (const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
 
void AddBezier (const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
 
void AddBezier (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
 
void AddBezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
 
void AddBeziers (const ArrayPtr< Point > &points)
 
void AddBeziers (const ArrayPtr< PointF > &points)
 
void AddLine (const Point &pt1, const Point &pt2)
 
void AddLine (const PointF &pt1, const PointF &pt2)
 
void AddLine (int x1, int y1, int x2, int y2)
 
void AddLine (float x1, float y1, float x2, float y2)
 
void AddLines (const ArrayPtr< PointF > &points)
 
void AddLines (const ArrayPtr< Point > &points)
 
void AddString (const String &text, const SharedPtr< FontFamily > &family, int style, float emSize, Point origin, const SharedPtr< StringFormat > &stringFormat)
 
void AddString (const String &text, const SharedPtr< FontFamily > &family, int style, float emSize, PointF origin, const SharedPtr< StringFormat > &stringFormat)
 
void AddString (const String &text, const SharedPtr< FontFamily > &family, int style, float emSize, Rectangle layoutRect, const SharedPtr< StringFormat > &stringFormat)
 
void AddString (const String &text, const SharedPtr< FontFamily > &family, int style, float emSize, RectangleF layoutRect, const SharedPtr< StringFormat > &stringFormat)
 
void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle)
 
void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle)
 
void AddArc (const RectangleF &rect, float startAngle, float sweepAngle)
 
void AddArc (const Rectangle &rect, float startAngle, float sweepAngle)
 
void AddEllipse (float x, float y, float width, float height)
 
void AddEllipse (int x, int y, int width, int height)
 
void AddEllipse (const RectangleF &rect)
 
void AddEllipse (const Rectangle &rect)
 
void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle)
 
void AddPie (int x, int y, int width, int height, float startAngle, float sweepAngle)
 
void AddPie (const Rectangle &rect, float startAngle, float sweepAngle)
 
void AddPath (const SharedPtr< GraphicsPath > &path, bool connect)
 
void AddRectangle (const Rectangle &rect)
 
void AddRectangle (const RectangleF &rect)
 
void AddRectangles (const ArrayPtr< Rectangle > &rects)
 
void AddRectangles (const ArrayPtr< RectangleF > &rects)
 
void AddPolygon (const ArrayPtr< PointF > &points)
 
void AddPolygon (const ArrayPtr< Point > &points)
 
void AddCurve (const ArrayPtr< PointF > &points, float tension=0.5)
 
void AddCurve (const ArrayPtr< Point > &points, float tension=0.5)
 
void AddCurve (const ArrayPtr< PointF > &points, int offset, int number_of_segments, float tension)
 
void AddCurve (const ArrayPtr< Point > &points, int offset, int number_of_segments, float tension)
 
void AddClosedCurve (const ArrayPtr< PointF > &points, float tension=0.5)
 
void AddClosedCurve (const ArrayPtr< Point > &points, float tension=0.5)
 
void StartFigure ()
 Starts a new figure. More...
 
void CloseFigure ()
 Closes the current figure and starts a new one. More...
 
void CloseAllFigures ()
 Closes all open figures and starts a new one. More...
 
RectangleF GetBounds (const MatrixPtr &matrix=nullptr, const SharedPtr< Pen > &pen=nullptr) const
 
PointF GetLastPoint () const
 Returns a PointF object representing the last point in the path. More...
 
void Reset ()
 Empties the path by removing all points from it. More...
 
void Transform (const MatrixPtr &matrix)
 
void Transform (const SkMatrix &matrix)
 
void Flatten ()
 
void Flatten (const MatrixPtr &matrix)
 
void Flatten (const MatrixPtr &matrix, float flatness)
 
void Widen (const SharedPtr< Pen > &pen)
 
bool IsVisible (const PointF &point)
 
bool IsVisible (float x, float y)
 
bool IsOutlineVisible (const PointF &point, const SharedPtr< Pen > &pen)
 
virtual SharedPtr< GraphicsPathClone ()
 
void Dispose ()
 Releases all operating system resources acquired by the current object. More...
 
Detail::FigureType GetFigureFlags ()
 
void SetMarkers ()
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

void AddBezierImpl (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3, SkScalar x4, SkScalar y4)
 
void AddLineImpl (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)
 
void AddArcImpl (SkScalar left, SkScalar top, SkScalar width, SkScalar height, SkScalar startAngle, SkScalar sweepAngle)
 
void AddEllipseImpl (SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
 
void AddPieImpl (SkScalar left, SkScalar top, SkScalar right, SkScalar bottom, SkScalar startAngle, SkScalar sweepAngle)
 
void AddStringImpl (const String &text, const SharedPtr< FontFamily > &family, int style, float emSize, SkRect layoutRect, const SharedPtr< StringFormat > &stringFormat)
 
std::shared_ptr< SkPath > GetSkPath (const SharedPtr< Pen > &pen, const SkMatrix &matrix)
 
ArrayPtr< uint8_t > get_PathTypesImpl (bool forceClose) const
 
ArrayPtr< uint8_t > get_PathTypesImpl () const
 

Static Protected Member Functions

static SkPath ConvertCurves (const SkPath &source)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Represents a set of connected lines and curves. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Constructor & Destructor Documentation

◆ GraphicsPath() [1/4]

System::Drawing::Drawing2D::GraphicsPath::GraphicsPath ( FillMode  fillMode = FillMode::Alternate)

Constructs a new instance of GraphicsPath class with the specified fill mode.

Parameters
fillModeSpecifies how the interior of the closed path represented by the object being created should be filled

◆ GraphicsPath() [2/4]

System::Drawing::Drawing2D::GraphicsPath::GraphicsPath ( const ArrayPtr< Point > &  pts,
const ArrayPtr< uint8_t > &  types,
FillMode  fillMode = FillMode::Alternate 
)

Constructs a new instance of GraphicsPath object that represents the specified path.

Parameters
ptsAn array containing the points that specify the path to be represented by the object being created
typesAn array containing the values tha specify the types of the corresponding points in pts array
fillModeSpecifies how the interior of the closed path represented by the object being created should be filled

◆ GraphicsPath() [3/4]

System::Drawing::Drawing2D::GraphicsPath::GraphicsPath ( const ArrayPtr< PointF > &  pts,
const ArrayPtr< uint8_t > &  types,
FillMode  fillMode = FillMode::Alternate 
)

Constructs a new instance of GraphicsPath object that represents the specified path.

Parameters
ptsAn array containing the points that specify the path to be represented by the object being created
typesAn array containing the values tha specify the types of the corresponding points in pts array
fillModeSpecifies how the interior of the closed path represented by the object being created should be filled

◆ GraphicsPath() [4/4]

System::Drawing::Drawing2D::GraphicsPath::GraphicsPath ( const SkPath &  path)

◆ ~GraphicsPath()

System::Drawing::Drawing2D::GraphicsPath::~GraphicsPath ( )

Destructor.

Member Function Documentation

◆ AddArc() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddArc ( float  x,
float  y,
float  width,
float  height,
float  startAngle,
float  sweepAngle 
)

Adds the specified elliptical arc to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
widthThe width of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
heightThe height of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
startAngleSpecifies the starting angle of the arc in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the arc

◆ AddArc() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddArc ( int  x,
int  y,
int  width,
int  height,
float  startAngle,
float  sweepAngle 
)

Adds the specified elliptical arc to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
widthThe width of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
heightThe height of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
startAngleSpecifies the starting angle of the arc in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the arc

◆ AddArc() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddArc ( const RectangleF rect,
float  startAngle,
float  sweepAngle 
)

Adds the specified elliptical arc to the path represented by the current object.

Parameters
rectThe rectangle that bounds the ellipse from which the arc is drawn
startAngleSpecifies the starting angle of the arc in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the arc

◆ AddArc() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddArc ( const Rectangle rect,
float  startAngle,
float  sweepAngle 
)

Adds the specified elliptical arc to the path represented by the current object.

Parameters
rectThe rectangle that bounds the ellipse from which the arc is drawn
startAngleSpecifies the starting angle of the arc in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the arc

◆ AddArcImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddArcImpl ( SkScalar  left,
SkScalar  top,
SkScalar  width,
SkScalar  height,
SkScalar  startAngle,
SkScalar  sweepAngle 
)
protected

Adds the specified elliptical arc to the path represented by the current object.

Parameters
leftThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
topThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
widthThe width of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
heightThe height of the upper left corner of the rectangle that bounds the ellipse from which the arc is drawn
startAngleSpecifies the starting angle of the arc in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the arc

◆ AddBezier() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddBezier ( const Point pt1,
const Point pt2,
const Point pt3,
const Point pt4 
)

Adds the specified cubic Bezier curve to the path represented by the current object.

Parameters
pt1The starting point of the curve to add
pt2The 1-st control point of the curve to add
pt3The 2-nd control point of the curve to add
pt4The ending point of the curve to add

◆ AddBezier() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddBezier ( const PointF pt1,
const PointF pt2,
const PointF pt3,
const PointF pt4 
)

Adds the specified cubic Bezier curve to the path represented by the current object.

Parameters
pt1The starting point of the curve to add
pt2The 1-st control point of the curve to add
pt3The 2-nd control point of the curve to add
pt4The ending point of the curve to add

◆ AddBezier() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddBezier ( int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
int  x4,
int  y4 
)

Adds the specified cubic Bezier curve to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the curve to add
y1The Y coordinate of the starting point of the curve to add
x2The X coordinate of the 1-st control point of the curve to add
y2The Y coordinate of the 1-st control point of the curve to add
x3The X coordinate of the 2-nd control point of the curve to add
y3The Y coordinate of the 2-nd control point of the curve to add
x4The X coordinate of the ending point of the curve to add
y4The Y coordinate of the ending point of the curve to add

◆ AddBezier() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddBezier ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4 
)

Adds the specified cubic Bezier curve to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the curve to add
y1The Y coordinate of the starting point of the curve to add
x2The X coordinate of the 1-st control point of the curve to add
y2The Y coordinate of the 1-st control point of the curve to add
x3The X coordinate of the 2-nd control point of the curve to add
y3The Y coordinate of the 2-nd control point of the curve to add
x4The X coordinate of the ending point of the curve to add
y4The Y coordinate of the ending point of the curve to add

◆ AddBezierImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddBezierImpl ( SkScalar  x1,
SkScalar  y1,
SkScalar  x2,
SkScalar  y2,
SkScalar  x3,
SkScalar  y3,
SkScalar  x4,
SkScalar  y4 
)
protected

Adds the specified cubic Bezier curve to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the curve to add
y1The Y coordinate of the starting point of the curve to add
x2The X coordinate of the 1-st control point of the curve to add
y2The Y coordinate of the 1-st control point of the curve to add
x3The X coordinate of the 2-nd control point of the curve to add
y3The Y coordinate of the 2-nd control point of the curve to add
x4The X coordinate of the ending point of the curve to add
y4The Y coordinate of the ending point of the curve to add

◆ AddBeziers() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddBeziers ( const ArrayPtr< Point > &  points)

Adds a sequence of connected cubic Bezier curves to the current figure.

Parameters
pointsAn array of Point structures that represents the points that define the curves

◆ AddBeziers() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddBeziers ( const ArrayPtr< PointF > &  points)

Adds a sequence of connected cubic Bezier curves to the current figure.

Parameters
pointsAn array of PointF structures that represents the points that define the curves

◆ AddClosedCurve() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddClosedCurve ( const ArrayPtr< PointF > &  points,
float  tension = 0.5 
)

Adds the specified closed curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddClosedCurve() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddClosedCurve ( const ArrayPtr< Point > &  points,
float  tension = 0.5 
)

Adds the specified closed curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddCurve() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddCurve ( const ArrayPtr< PointF > &  points,
float  tension = 0.5 
)

Adds the specified curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddCurve() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddCurve ( const ArrayPtr< Point > &  points,
float  tension = 0.5 
)

Adds the specified curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddCurve() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddCurve ( const ArrayPtr< PointF > &  points,
int  offset,
int  number_of_segments,
float  tension 
)

Adds the specified curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
offsetThe index of the point in points that is used as the staring poit of the curve
number_of_segmentsThe number of segments used to draw the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddCurve() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddCurve ( const ArrayPtr< Point > &  points,
int  offset,
int  number_of_segments,
float  tension 
)

Adds the specified curve to the path represented by the current object.

Parameters
pointsPoints that specify the curve
offsetThe index of the point in points that is used as the staring poit of the curve
number_of_segmentsThe number of segments used to draw the curve
tensionSpecifies the amount that the curve bends between the control points

◆ AddEllipse() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddEllipse ( float  x,
float  y,
float  width,
float  height 
)

Adds the specified ellipse to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse to add
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse to add
widthThe width of the upper left corner of the rectangle that bounds the ellipse to add
heightThe height of the upper left corner of the rectangle that bounds the ellipse to add

◆ AddEllipse() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddEllipse ( int  x,
int  y,
int  width,
int  height 
)

Adds the specified ellipse to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse to add
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse to add
widthThe width of the upper left corner of the rectangle that bounds the ellipse to add
heightThe height of the upper left corner of the rectangle that bounds the ellipse to add

◆ AddEllipse() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddEllipse ( const RectangleF rect)

Adds the specified ellipse to the path represented by the current object.

Parameters
rectSpecifies a rectangle that bounds the ellipse to add

◆ AddEllipse() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddEllipse ( const Rectangle rect)

Adds the specified ellipse to the path represented by the current object.

Parameters
rectSpecifies a rectangle that bounds the ellipse to add

◆ AddEllipseImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddEllipseImpl ( SkScalar  left,
SkScalar  top,
SkScalar  right,
SkScalar  bottom 
)
protected

Adds the specified ellipse to the path represented by the current object.

Parameters
leftThe X coordinate of the upper left corner of the rectangle that bounds the ellipse to add
topThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse to add
rightThe X coordinate of the bottom right corner of the rectangle that bounds the ellipse to add
bottomThe Y coordinate of the bottom right corner of the rectangle that bounds the ellipse to add

◆ AddLine() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddLine ( const Point pt1,
const Point pt2 
)

Adds the specified line to the path represented by the current object.

Parameters
pt1The starting point of the line to add
pt2The ending point of the line to add

◆ AddLine() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddLine ( const PointF pt1,
const PointF pt2 
)

Adds the specified line to the path represented by the current object.

Parameters
pt1The starting point of the line to add
pt2The ending point of the line to add

◆ AddLine() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Adds the specified line to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the line to add
y1The Y coordinate of the starting point of the line to add
x2The X coordinate of the ending point of the line to add
y2The Y coordinate of the ending point of the line to add

◆ AddLine() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddLine ( float  x1,
float  y1,
float  x2,
float  y2 
)

Adds the specified line to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the line to add
y1The Y coordinate of the starting point of the line to add
x2The X coordinate of the ending point of the line to add
y2The Y coordinate of the ending point of the line to add

◆ AddLineImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddLineImpl ( SkScalar  x1,
SkScalar  y1,
SkScalar  x2,
SkScalar  y2 
)
protected

Adds the specified line to the path represented by the current object.

Parameters
x1The X coordinate of the starting point of the line to add
y1The Y coordinate of the starting point of the line to add
x2The X coordinate of the ending point of the line to add
y2The Y coordinate of the ending point of the line to add

◆ AddLines() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddLines ( const ArrayPtr< PointF > &  points)

Adds the specified series of connected line segments to the path represented by the current object.

Parameters
pointsAn array containing points that specify the line segments to add

◆ AddLines() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddLines ( const ArrayPtr< Point > &  points)

Adds the specified series of connected line segments to the path represented by the current object.

Parameters
pointsAn array containing points that specify the line segments to add

◆ AddPath()

void System::Drawing::Drawing2D::GraphicsPath::AddPath ( const SharedPtr< GraphicsPath > &  path,
bool  connect 
)

Adds the specified path to the path represented by the current object.

Parameters
pathThe path to add
connectTrue specifies that the last first figure in the path is part of the last figure of the path represented by the current object; false specifies that the first figure in the path and the last figure in the path represented by the current object are separate figures

◆ AddPie() [1/3]

void System::Drawing::Drawing2D::GraphicsPath::AddPie ( float  x,
float  y,
float  width,
float  height,
float  startAngle,
float  sweepAngle 
)

Adds the specified outline of the pie shape to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
widthThe width of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
heightThe height of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
startAngleSpecifies the starting angle of the pie in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the pie

◆ AddPie() [2/3]

void System::Drawing::Drawing2D::GraphicsPath::AddPie ( int  x,
int  y,
int  width,
int  height,
float  startAngle,
float  sweepAngle 
)

Adds the specified outline of the pie shape to the path represented by the current object.

Parameters
xThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
yThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
widthThe width of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
heightThe height of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
startAngleSpecifies the starting angle of the pie in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the pie

◆ AddPie() [3/3]

void System::Drawing::Drawing2D::GraphicsPath::AddPie ( const Rectangle rect,
float  startAngle,
float  sweepAngle 
)

Adds the specified outline of the pie shape to the path represented by the current object.

Parameters
rectThe rectangle that bounds the ellipse from which the pie is drawn
startAngleSpecifies the starting angle of the pie in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the pie

◆ AddPieImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddPieImpl ( SkScalar  left,
SkScalar  top,
SkScalar  right,
SkScalar  bottom,
SkScalar  startAngle,
SkScalar  sweepAngle 
)
protected

Adds the specified outline of the pie shape to the path represented by the current object.

Parameters
leftThe X coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
topThe Y coordinate of the upper left corner of the rectangle that bounds the ellipse from which the pie is drawn
rightThe X coordinate of the bottom right corner of the rectangle that bounds the ellipse from which the pie is drawn
bottomThe Y coordinate of the bottom right corner of the rectangle that bounds the ellipse from which the pie is drawn
startAngleSpecifies the starting angle of the pie in degrees, measured clockwise from the X-axis
sweepAngleSpecifies the angle between the starting angle and the end of the pie

◆ AddPolygon() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddPolygon ( const ArrayPtr< PointF > &  points)

Adds the specified polygon to the path represented by the current object.

Parameters
pointsAn array containing points that specify the polygon to add

◆ AddPolygon() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddPolygon ( const ArrayPtr< Point > &  points)

Adds the specified polygon to the path represented by the current object.

Parameters
pointsAn array containing points that specify the polygon to add

◆ AddRectangle() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddRectangle ( const Rectangle rect)

Adds the specified rectangle to the path represented by the current object.

Parameters
rectA rectangle to add

◆ AddRectangle() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddRectangle ( const RectangleF rect)

Adds the specified rectangle to the path represented by the current object.

Parameters
rectA rectangle to add

◆ AddRectangles() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::AddRectangles ( const ArrayPtr< Rectangle > &  rects)

Adds the specified series of rectangles to the path represented by the current object.

Parameters
rectsAn array of Rectangle objects representing the rectangles to add

◆ AddRectangles() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::AddRectangles ( const ArrayPtr< RectangleF > &  rects)

Adds the specified series of rectangles to the path represented by the current object.

Parameters
rectsAn array of RectangleF objects representing the rectangles to add

◆ AddString() [1/4]

void System::Drawing::Drawing2D::GraphicsPath::AddString ( const String text,
const SharedPtr< FontFamily > &  family,
int  style,
float  emSize,
Point  origin,
const SharedPtr< StringFormat > &  stringFormat 
)

Adds a string of text to the path represented by the current object.

Parameters
textThe text to add
familyThe font family used to draw the text
styleA FontStyle enumeration value tha specifies the font style to use
emSizeThe height of the em square box that bounds each character of the string
originSpecifies the location where the text starts
stringFormatThe format of the string

◆ AddString() [2/4]

void System::Drawing::Drawing2D::GraphicsPath::AddString ( const String text,
const SharedPtr< FontFamily > &  family,
int  style,
float  emSize,
PointF  origin,
const SharedPtr< StringFormat > &  stringFormat 
)

Adds a string of text to the path represented by the current object.

Parameters
textThe text to add
familyThe font family used to draw the text
styleA FontStyle enumeration value tha specifies the font style to use
emSizeThe height of the em square box that bounds each character of the string
originSpecifies the location where the text starts
stringFormatThe format of the string

◆ AddString() [3/4]

void System::Drawing::Drawing2D::GraphicsPath::AddString ( const String text,
const SharedPtr< FontFamily > &  family,
int  style,
float  emSize,
Rectangle  layoutRect,
const SharedPtr< StringFormat > &  stringFormat 
)

Adds a string of text to the path represented by the current object.

Parameters
textThe text to add
familyThe font family used to draw the text
styleA FontStyle enumeration value tha specifies the font style to use
emSizeThe height of the em square box that bounds each character of the string
layoutRectA rectangle that bounds the text
stringFormatThe format of the string

◆ AddString() [4/4]

void System::Drawing::Drawing2D::GraphicsPath::AddString ( const String text,
const SharedPtr< FontFamily > &  family,
int  style,
float  emSize,
RectangleF  layoutRect,
const SharedPtr< StringFormat > &  stringFormat 
)

Adds a string of text to the path represented by the current object.

Parameters
textThe text to add
familyThe font family used to draw the text
styleA FontStyle enumeration value tha specifies the font style to use
emSizeThe height of the em square box that bounds each character of the string
layoutRectA rectangle that bounds the text
stringFormatThe format of the string

◆ AddStringImpl()

void System::Drawing::Drawing2D::GraphicsPath::AddStringImpl ( const String text,
const SharedPtr< FontFamily > &  family,
int  style,
float  emSize,
SkRect  layoutRect,
const SharedPtr< StringFormat > &  stringFormat 
)
protected

Adds a string of text to the path represented by the current object.

Parameters
textThe text to add
familyThe font family used to draw the text
styleA FontStyle enumeration value tha specifies the font style to use
emSizeThe height of the em square box that bounds each character of the string
layoutRectA rectangle that bounds the text
stringFormatThe format of the string

◆ Clone()

virtual SharedPtr<GraphicsPath> System::Drawing::Drawing2D::GraphicsPath::Clone ( )
virtual

Creates a copy of the current object.

Returns
A GraphicsPath object which is an exact copy of the current object.

◆ CloseAllFigures()

void System::Drawing::Drawing2D::GraphicsPath::CloseAllFigures ( )

Closes all open figures and starts a new one.

◆ CloseFigure()

void System::Drawing::Drawing2D::GraphicsPath::CloseFigure ( )

Closes the current figure and starts a new one.

◆ ConvertCurves()

static SkPath System::Drawing::Drawing2D::GraphicsPath::ConvertCurves ( const SkPath &  source)
staticprotected

Converts path curves into the ones available in .NET engine so ported code can work with them.

Parameters
sourcePath to convert curves of.
Returns
Converted path.

◆ Dispose()

void System::Drawing::Drawing2D::GraphicsPath::Dispose ( )
inline

Releases all operating system resources acquired by the current object.

◆ Flatten() [1/3]

void System::Drawing::Drawing2D::GraphicsPath::Flatten ( )

Flattens each curve in the path by converting them into a series of connected lines. The flatness value of 0.25 is used.

◆ Flatten() [2/3]

void System::Drawing::Drawing2D::GraphicsPath::Flatten ( const MatrixPtr matrix)

Flattens each curve in the path by converting them into a series of connected lines. The flatness value of 0.25 is used.

Parameters
matrixThe transform matrix to apply to the path before flattening

◆ Flatten() [3/3]

void System::Drawing::Drawing2D::GraphicsPath::Flatten ( const MatrixPtr matrix,
float  flatness 
)

Flattens each curve in the path by converting them into a series of connected lines.

Parameters
matrixThe transform matrix to apply to the path before flattening
flatnessSpecifies the maximum permitted error between the curve and its flattened approximation

◆ get_FillMode()

FillMode System::Drawing::Drawing2D::GraphicsPath::get_FillMode ( )

Returns the fill mode of the current object.

◆ get_PathData()

SharedPtr<PathData> System::Drawing::Drawing2D::GraphicsPath::get_PathData ( )

Returns a PathData object containing the points that make up a path represented by the current object and their types.

◆ get_PathPoints()

ArrayPtr<PointF> System::Drawing::Drawing2D::GraphicsPath::get_PathPoints ( ) const

Returns an array that contains points that make up a path represented by the current object.

◆ get_PathTypes()

ArrayPtr<uint8_t> System::Drawing::Drawing2D::GraphicsPath::get_PathTypes ( ) const

Returns an array that contains values that indicate the types of the points that make up a path represented by the current object.

◆ get_PathTypesImpl() [1/2]

ArrayPtr<uint8_t> System::Drawing::Drawing2D::GraphicsPath::get_PathTypesImpl ( bool  forceClose) const
protected

Returns an array that contains values that indicate the types of the points that make up a path represented by the current object.

Parameters
forceCloseTrue to complete each contur with Closes Verb, otherwise - false

◆ get_PathTypesImpl() [2/2]

ArrayPtr<uint8_t> System::Drawing::Drawing2D::GraphicsPath::get_PathTypesImpl ( ) const
protected

Returns an array that contains values that indicate the types of the points that make up a path represented by the current object.

◆ get_PointCount()

int System::Drawing::Drawing2D::GraphicsPath::get_PointCount ( ) const

Returns the number of points in the path represented by the current object.

◆ GetBounds()

RectangleF System::Drawing::Drawing2D::GraphicsPath::GetBounds ( const MatrixPtr matrix = nullptr,
const SharedPtr< Pen > &  pen = nullptr 
) const

Returns a RectangleF object that represents a rectangle that bounds the path represented by the current object when it is transformed with the specified matrix.

Parameters
matrixThe transform matrix
penA Pen to calculate the bounding rectangle.

◆ GetFigureFlags()

Detail::FigureType System::Drawing::Drawing2D::GraphicsPath::GetFigureFlags ( )
inline

Returns a value which is a bitwise combination of Detail::FigureType values that indicates what types of figures are contained within the path represented by the current object.

◆ GetLastPoint()

PointF System::Drawing::Drawing2D::GraphicsPath::GetLastPoint ( ) const

Returns a PointF object representing the last point in the path.

◆ GetSkPath()

std::shared_ptr<SkPath> System::Drawing::Drawing2D::GraphicsPath::GetSkPath ( const SharedPtr< Pen > &  pen,
const SkMatrix &  matrix 
)
protected

Returns a processed SkPath.

Parameters
penA pen to use when drawing
matrixA matrix to use when drawing

◆ IsOutlineVisible()

bool System::Drawing::Drawing2D::GraphicsPath::IsOutlineVisible ( const PointF point,
const SharedPtr< Pen > &  pen 
)

Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen. NOT EMPLEMENTED

Parameters
pointThe point to test
penThe Pen to test

◆ IsVisible() [1/2]

bool System::Drawing::Drawing2D::GraphicsPath::IsVisible ( const PointF point)

Determines if the specified point is contained within the path represented by the current object.

Parameters
pointThe point to check

◆ IsVisible() [2/2]

bool System::Drawing::Drawing2D::GraphicsPath::IsVisible ( float  x,
float  y 
)

Determines if the specified point is contained within the path represented by the current object.

Parameters
xThe X coordiate of the point to check
yThe Y coordiate of the point to check

◆ Reset()

void System::Drawing::Drawing2D::GraphicsPath::Reset ( )

Empties the path by removing all points from it.

◆ Reverse()

void System::Drawing::Drawing2D::GraphicsPath::Reverse ( )

Reverses the order of points in the PathPoints array of this GraphicsPath.

◆ set_FillMode()

void System::Drawing::Drawing2D::GraphicsPath::set_FillMode ( FillMode  mode)

Sets the fill mode of the current object.

Parameters
modeThe value to set

◆ SetMarkers()

void System::Drawing::Drawing2D::GraphicsPath::SetMarkers ( )

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ StartFigure()

void System::Drawing::Drawing2D::GraphicsPath::StartFigure ( )

Starts a new figure.

◆ Transform() [1/2]

void System::Drawing::Drawing2D::GraphicsPath::Transform ( const MatrixPtr matrix)

Transforms the path represented by the current object by applying the specified transform matrix to it.

Parameters
matrixThe transform matrix specifying the transformation

◆ Transform() [2/2]

void System::Drawing::Drawing2D::GraphicsPath::Transform ( const SkMatrix &  matrix)

◆ Widen()

void System::Drawing::Drawing2D::GraphicsPath::Widen ( const SharedPtr< Pen > &  pen)

Replaces this path with an outline around the original path

Parameters
penA Pen object that specifies the width between the original and the new outlines