Class GraphicsPath

GraphicsPath class

Represents a series of connected lines and curves.

public class GraphicsPath : IDisposable

Constructors

NameDescription
GraphicsPath()Initializes a new instance of the GraphicsPath class with a FillMode value of Alternate.
GraphicsPath(FillMode)Initializes a new instance of the GraphicsPath class with the specified FillMode enumeration.
GraphicsPath(PointF[], byte[])Initializes a new instance of the GraphicsPath class with the specified PathPointType and PointF arrays.
GraphicsPath(Point[], byte[])Initializes a new instance of the GraphicsPath class with the specified PathPointType and Point arrays.
GraphicsPath(PointF[], byte[], FillMode)Initializes a new instance of the GraphicsPath class with the specified PathPointType and PointF arrays and with the specified FillMode enumeration element..
GraphicsPath(Point[], byte[], FillMode)Initializes a new instance of the GraphicsPath class with the specified PathPointType and Point arrays and with the specified FillMode enumeration element..

Properties

NameDescription
FillMode { get; set; }Gets or sets a FillMode enumeration that determines how the interiors of shapes in this GraphicsPath are filled.
PathData { get; }Gets a PathData that encapsulates arrays of points and types for this GraphicsPath
PathPoints { get; }Gets the points in the path.
PathTypes { get; }Gets the types of the corresponding points in the PathPoints array.
PointCount { get; }Gets the number of elements in the PathPoints or the PathTypes array.

Methods

NameDescription
AddArc(RectangleF, float, float)Appends an elliptical arc to the current figure.
AddArc(float, float, float, float, float, float)Appends an elliptical arc to the current figure.
AddBezier(PointF, PointF, PointF, PointF)Adds a cubic Bézier curve to the current figure.
AddBezier(float, float, float, float, float, float, float, float)Adds a cubic Bézier curve to the current figure.
AddBeziers(PointF[])Adds a sequence of connected cubic Bézier curves to the current figure.
AddBeziers(Point[])Adds a sequence of connected cubic Bézier curves to the current figure.
AddClosedCurve(PointF[])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.
AddClosedCurve(PointF[], float)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.
AddCurve(PointF[])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.
AddCurve(Point[])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.
AddCurve(PointF[], float)Adds a spline curve to the current figure.
AddCurve(PointF[], int, int, float)Adds a spline curve to the current figure.
AddEllipse(RectangleF)Adds an ellipse to the current path.
AddEllipse(float, float, float, float)Adds an ellipse to the current path.
AddLine(PointF, PointF)Appends a line segment to this GraphicsPath.
AddLine(float, float, float, float)Appends a line segment to this GraphicsPath.
AddLines(PointF[])Appends a series of connected line segments to the end of this GraphicsPath.
AddLines(Point[])Appends a series of connected line segments to the end of this GraphicsPath.
AddPath(GraphicsPath, bool)Appends the specified GraphicsPath to this path.
AddPie(Rectangle, float, float)Adds the outline of a pie shape to this path.
AddPie(float, float, float, float, float, float)Adds the outline of a pie shape to this path.
AddPolygon(PointF[])Adds a polygon to this path.
AddPolygon(Point[])Adds a polygon to this path.
AddRectangle(Rectangle)Adds a rectangle to this path.
AddRectangle(RectangleF)Adds a rectangle to this path.
AddRectangles(RectangleF[])Adds a series of rectangles to this path.
AddRectangles(Rectangle[])Adds a series of rectangles to this path.
AddString(string, FontFamily, int, float, Point, StringFormat)Adds a text string to this path.
AddString(string, FontFamily, int, float, PointF, StringFormat)Adds a text string to this path.
AddString(string, FontFamily, int, float, Rectangle, StringFormat)Adds a text string to this path.
AddString(string, FontFamily, int, float, RectangleF, StringFormat)Adds a text string to this path.
Clone()Make a copy of the current path object.
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.
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.
Dispose()Releases all resources used by this GraphicsPath.
Flatten()Converts each curve in this path into a sequence of connected line segments.
Flatten(Matrix)Applies the specified transform and then converts each curve in this GraphicsPath.
Flatten(Matrix, float)Converts each curve in this GraphicsPath into a sequence of connected line segments.
GetBounds()Returns a rectangle that bounds this GraphicsPath.
GetBounds(Matrix)Returns a rectangle that bounds this GraphicsPath when this path is transformed by the specified Matrix.
GetBounds(Matrix, Pen)Returns a rectangle that bounds this GraphicsPath when the current path is transformed by the specified Matrix and drawn with the specified Pen.
GetLastPoint()Gets the last point in the PathPoints array of this GraphicsPath.
IsOutlineVisible(PointF, Pen)Indicates whether the specified point is contained within (under) the outline of this GraphicsPath when drawn with the specified Pen.
IsVisible(Point)Indicates whether the specified point is contained within this GraphicsPath.
IsVisible(PointF)Indicates whether the specified point is contained within this GraphicsPath.
IsVisible(float, float)Indicates whether the specified point is contained within this GraphicsPath.
IsVisible(int, int)Indicates whether the specified point is contained within this GraphicsPath.
IsVisible(Point, Graphics)Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.
IsVisible(PointF, Graphics)Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.
IsVisible(float, float, Graphics)Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.
IsVisible(int, int, Graphics)Indicates whether the specified point is contained within this GraphicsPath, using the specified Graphics.
Reset()Empties the PathPoints and PathTypes arrays and sets the FillMode to Alternate.
Reverse()Reverses the order of points in the PathPoints array of this GraphicsPath.
SetMarkers()Sets a marker on this GraphicsPath.
StartFigure()Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
Transform(Matrix)Applies a transform matrix to this GraphicsPath.
Warp(PointF[], RectangleF)Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Warp(PointF[], RectangleF, Matrix)Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Warp(PointF[], RectangleF, Matrix, WarpMode)Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Warp(PointF[], RectangleF, Matrix, WarpMode, float)Applies a warp transform, defined by a rectangle and a parallelogram, to this GraphicsPath.
Widen(Pen)Adds an additional outline to the path.
Widen(Pen, Matrix)Adds an additional outline to the GraphicsPath.
Widen(Pen, Matrix, float)Replaces this GraphicsPath with curves that enclose the area that is filled when this path is drawn by the specified pen.

See Also