<PackageReference Include="System.Drawing.Common" Version="8.0.0-preview.6.23329.4" />

GraphicsPath

Represents a series of connected lines and curves. This class cannot be inherited.
public FillMode FillMode { get; set; }

Gets or sets a FillMode enumeration that determines how the interiors of shapes in this GraphicsPath are filled.

public PathData PathData { get; }

Gets a PathData that encapsulates arrays of points (points) and types (types) for this GraphicsPath.

public PointF[] PathPoints { get; }

Gets the points in the path.

public byte[] PathTypes { get; }

Gets the types of the corresponding points in the PathPoints array.

public int PointCount { get; }

Gets the number of elements in the PathPoints or the PathTypes array.

public GraphicsPath()

Initializes a new instance of the GraphicsPath class with a FillMode value of Alternate.

public GraphicsPath(FillMode fillMode)

Initializes a new instance of the GraphicsPath class with the specified FillMode enumeration.

public GraphicsPath(PointF[] pts, byte[] types)

Initializes a new instance of the GraphicsPath array with the specified PathPointType and PointF arrays.

public GraphicsPath(PointF[] pts, byte[] types, FillMode fillMode)

Initializes a new instance of the GraphicsPath array with the specified PathPointType and PointF arrays and with the specified FillMode enumeration element.

public GraphicsPath(Point[] pts, byte[] types)

Initializes a new instance of the GraphicsPath class with the specified PathPointType and Point arrays.

public GraphicsPath(Point[] pts, byte[] types, FillMode fillMode)

Initializes a new instance of the GraphicsPath class with the specified PathPointType and Point arrays and with the specified FillMode enumeration element.

public void AddArc(Rectangle rect, float startAngle, float sweepAngle)

Appends an elliptical arc to the current figure.

public void AddArc(RectangleF rect, float startAngle, float sweepAngle)

Appends an elliptical arc to the current figure.

public void AddArc(int x, int y, int width, int height, float startAngle, float sweepAngle)

Appends an elliptical arc to the current figure.

public void AddArc(float x, float y, float width, float height, float startAngle, float sweepAngle)

Appends an elliptical arc to the current figure.

public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)

Adds a cubic Bézier curve to the current figure.

public void AddBeziers(PointF[] points)

Adds a sequence of connected cubic Bézier curves to the current figure.

public void AddBeziers(Point[] points)

Adds a sequence of connected cubic Bézier curves to the current figure.

public void AddClosedCurve(PointF[] points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddClosedCurve(PointF[] points, float tension)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddClosedCurve(Point[] points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddClosedCurve(Point[] points, float tension)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddCurve(PointF[] points)

Adds a spline curve to the current figure. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddCurve(PointF[] points, int offset, int numberOfSegments, float tension)

Adds a spline curve to the current figure.

public void AddCurve(PointF[] points, float tension)

Adds a spline curve to the current figure.

public void AddCurve(Point[] points)

Adds a spline curve to the current figure. A cardinal spline curve is used because the curve travels through each of the points in the array.

public void AddCurve(Point[] points, int offset, int numberOfSegments, float tension)

Adds a spline curve to the current figure.

public void AddCurve(Point[] points, float tension)

Adds a spline curve to the current figure.

public void AddEllipse(Rectangle rect)

Adds an ellipse to the current path.

public void AddEllipse(RectangleF rect)

Adds an ellipse to the current path.

public void AddEllipse(int x, int y, int width, int height)

Adds an ellipse to the current path.

public void AddEllipse(float x, float y, float width, float height)

Adds an ellipse to the current path.

public void AddLine(Point pt1, Point pt2)

Appends a line segment to this GraphicsPath.

public void AddLine(PointF pt1, PointF pt2)

Appends a line segment to this GraphicsPath.

public void AddLine(int x1, int y1, int x2, int y2)

Appends a line segment to the current figure.

public void AddLine(float x1, float y1, float x2, float y2)

Appends a line segment to this GraphicsPath.

public void AddLines(PointF[] points)

Appends a series of connected line segments to the end of this GraphicsPath.

public void AddLines(Point[] points)

Appends a series of connected line segments to the end of this GraphicsPath.

public void AddPath(GraphicsPath addingPath, bool connect)

Appends the specified GraphicsPath to this path.

public void AddPie(Rectangle rect, float startAngle, float sweepAngle)

Adds the outline of a pie shape to this path.

public void AddPie(int x, int y, int width, int height, float startAngle, float sweepAngle)

Adds the outline of a pie shape to this path.

public void AddPie(float x, float y, float width, float height, float startAngle, float sweepAngle)

Adds the outline of a pie shape to this path.

public void AddPolygon(PointF[] points)

Adds a polygon to this path.

public void AddPolygon(Point[] points)

Adds a polygon to this path.

public void AddRectangle(Rectangle rect)

Adds a rectangle to this path.

public void AddRectangle(RectangleF rect)

Adds a rectangle to this path.

public void AddRectangles(RectangleF[] rects)

Adds a series of rectangles to this path.

public void AddRectangles(Rectangle[] rects)

Adds a series of rectangles to this path.

public void AddString(string s, FontFamily family, int style, float emSize, Point origin, StringFormat format)

Adds a text string to this path.

public void AddString(string s, FontFamily family, int style, float emSize, PointF origin, StringFormat format)

Adds a text string to this path.

public void AddString(string s, FontFamily family, int style, float emSize, Rectangle layoutRect, StringFormat format)

Adds a text string to this path.

public void AddString(string s, FontFamily family, int style, float emSize, RectangleF layoutRect, StringFormat format)

Adds a text string to this path.

public void ClearMarkers()

Clears all markers from this path.

public object Clone()

Creates an exact copy of this path.

public void CloseAllFigures()

Closes all open figures in this path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.

public void CloseFigure()

Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.

public void Dispose()

Releases all resources used by this GraphicsPath.

public void Flatten()

Converts each curve in this path into a sequence of connected line segments.

public void Flatten(Matrix matrix)

Applies the specified transform and then converts each curve in this GraphicsPath into a sequence of connected line segments.

public void Flatten(Matrix matrix, float flatness)

Converts each curve in this GraphicsPath into a sequence of connected line segments.

Returns a rectangle that bounds this GraphicsPath.

public RectangleF GetBounds(Matrix matrix)

Returns a rectangle that bounds this GraphicsPath when this path is transformed by the specified Matrix.

public RectangleF GetBounds(Matrix matrix, Pen pen)

Returns a rectangle that bounds this GraphicsPath when the current path is transformed by the specified Matrix and drawn with the specified Pen.

Gets the last point in the PathPoints array of this GraphicsPath.

public bool IsOutlineVisible(Point point, Pen pen)

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

public bool IsOutlineVisible(Point pt, Pen pen, Graphics graphics)

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

public bool IsOutlineVisible(PointF point, Pen pen)

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

public bool IsOutlineVisible(PointF pt, Pen pen, Graphics graphics)

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

public bool IsOutlineVisible(int x, int y, Pen pen)

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

public bool IsOutlineVisible(int x, int y, Pen pen, Graphics graphics)

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

public bool IsOutlineVisible(float x, float y, Pen pen)

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

public bool IsOutlineVisible(float x, float y, Pen pen, Graphics graphics)

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

public bool IsVisible(Point point)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(Point pt, Graphics graphics)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(PointF point)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(PointF pt, Graphics graphics)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(int x, int y)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(int x, int y, Graphics graphics)

Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.

public bool IsVisible(float x, float y)

Indicates whether the specified point is contained within this GraphicsPath.

public bool IsVisible(float x, float y, Graphics graphics)

Indicates whether the specified point is contained within this GraphicsPath in the visible clip region of the specified Graphics.

public void Reset()

Empties the PathPoints and PathTypes arrays and sets the FillMode to Alternate.

public void Reverse()

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

public void SetMarkers()

Sets a marker on this GraphicsPath.

public void StartFigure()

Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.

public void Transform(Matrix matrix)

Applies a transform matrix to this GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect)

Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix)

Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode)

Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.

public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode, float flatness)

Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.

public void Widen(Pen pen)

Adds an additional outline to the path.

public void Widen(Pen pen, Matrix matrix)

Adds an additional outline to the GraphicsPath.

public void Widen(Pen pen, Matrix matrix, float flatness)

Replaces this GraphicsPath with curves that enclose the area that is filled when this path is drawn by the specified pen.