GraphicsPathExtensions

public static class GraphicsPathExtensions
Extensions for the IGraphicsPath

Methods

AddArc

#Example
public static void AddArc(this IGraphicsPath path, RectangleF location, float startAngle, float sweepAngle)
Adds an arc to the path at the specified location
path (IGraphicsPath)Path to add the arc to
location (RectangleF)Location of the bounding rectangle of the arc
startAngle (float)Start angle in degrees
sweepAngle (float)Sweep angle (positive or negative) in degrees

AddCurve

#Example
public static void AddCurve(this IGraphicsPath path, float tension, params PointF[] points)
Adds a curve that intersects with the specified points to the path with the given tension
path (IGraphicsPath)Path to add the curve to
tension (float)Tension between points in the curve. Should be between 0 (no curve) and 1 (more curve)
points (params PointF[])Points that intersect with the curve

AddCurve

#Example
public static void AddCurve(this IGraphicsPath path, params PointF[] points)
Adds a curve that intersects with the specified points to the path
path (IGraphicsPath)Path to add the curve to
points (params PointF[])Points that define where the curve intersects

AddEllipse

#Example
public static void AddEllipse(this IGraphicsPath path, RectangleF location)
Adds an ellipse to the path at the specified location
path (IGraphicsPath)Path to add the ellipse to
location (RectangleF)Location of the bounding rectangle of the ellipse

AddLine

#Example
public static void AddLine(this IGraphicsPath path, PointF start, PointF end)
Adds a line to the path
path (IGraphicsPath)Path to add the line to
start (PointF)Starting point for the line
end (PointF)Ending point for the line

AddLines

#Example
public static void AddLines(this IGraphicsPath path, params PointF[] points)
Adds lines to each of the specified points

AddRectangle

#Example
public static void AddRectangle(this IGraphicsPath path, RectangleF location)
Adds a rectangle to the path at the specified location

LineTo

#Example
public static void LineTo(this IGraphicsPath path, PointF point)
Adds a line from the current position to the specified location

MoveTo

#Example
public static void MoveTo(this IGraphicsPath path, PointF point)
Moves the current position to the specified point without adding anything to the path