GraphicsPathExtensionMethods

public static class GraphicsPathExtensionMethods
Provides extension methods for the Eto graphicspath.

Methods

AddArc

#Example
public static void AddArc(this GraphicsPath path, ArcF arc)
Add an arc to the graphics path.
path (GraphicsPath)Path to append to.
arc (ArcF)Arc to append.

AddArc

#Example
public static void AddArc(this GraphicsPath path, PointF centre, float radius, float startAngle, float sweepAngle)
Add a circular arc to the graphics path.
path (GraphicsPath)Path to add to.
centre (PointF)Centre of circular arc.
radius (float)Radius of circular arc.
startAngle (float)Start angle, measured in degrees, clockwise from the x-axis.
sweepAngle (float)Sweep angle, measured in degrees, clockwise.

AddArc

#Example
public static void AddArc(this GraphicsPath path, PointF start, PointF end, SizeF tangent)
Add a circular arc to the graphics path.
path (GraphicsPath)Path to add to.
start (PointF)Start of circular arc.
end (PointF)End of circular arc.
tangent (SizeF)Tangent at start.

AddArcLowerLeft

#Example
public static void AddArcLowerLeft(this GraphicsPath path, PointF corner, float radius, bool clockwise)
Add an arc to the lower-left of a corner point.
path (GraphicsPath)
corner (PointF)
radius (float)
clockwise (bool)

AddArcLowerLeft

#Example
public static void AddArcLowerLeft(this GraphicsPath path, RectangleF rectangle, float radius, bool clockwise)
Add the arc in the lower left corner of a rectangle.
path (GraphicsPath)Path to append to.
rectangle (RectangleF)Rectangle.
radius (float)Radius of arc.
clockwise (bool)If true, the arc will be appended in a clockwise manner.

AddArcLowerRight

#Example
public static void AddArcLowerRight(this GraphicsPath path, PointF corner, float radius, bool clockwise)
Add an arc to the lower-right of a corner point.
path (GraphicsPath)
corner (PointF)
radius (float)
clockwise (bool)

AddArcLowerRight

#Example
public static void AddArcLowerRight(this GraphicsPath path, RectangleF rectangle, float radius, bool clockwise)
Add the arc in the lower right corner of a rectangle.
path (GraphicsPath)Path to append to.
rectangle (RectangleF)Rectangle.
radius (float)Radius of arc.
clockwise (bool)If true, the arc will be appended in a clockwise manner.

AddArcUpperLeft

#Example
public static void AddArcUpperLeft(this GraphicsPath path, PointF corner, float radius, bool clockwise)
Add an arc to the upper-left of a corner point.
path (GraphicsPath)
corner (PointF)
radius (float)
clockwise (bool)

AddArcUpperLeft

#Example
public static void AddArcUpperLeft(this GraphicsPath path, RectangleF rectangle, float radius, bool clockwise)
Add the arc in the upper left corner of a rectangle.
path (GraphicsPath)Path to append to.
rectangle (RectangleF)Rectangle.
radius (float)Radius of arc.
clockwise (bool)If true, the arc will be appended in a clockwise manner.

AddArcUpperRight

#Example
public static void AddArcUpperRight(this GraphicsPath path, PointF corner, float radius, bool clockwise)
Add an arc to the upper-right of a corner point.
path (GraphicsPath)
corner (PointF)
radius (float)
clockwise (bool)

AddArcUpperRight

#Example
public static void AddArcUpperRight(this GraphicsPath path, RectangleF rectangle, float radius, bool clockwise)
Add the arc in the upper right corner of a rectangle.
path (GraphicsPath)Path to append to.
rectangle (RectangleF)Rectangle.
radius (float)Radius of arc.
clockwise (bool)If true, the arc will be appended in a clockwise manner.

AddBezier

#Example
public static void AddBezier(this GraphicsPath path, BezierF bezier)
Add a BezierF to this graphics path.
path (GraphicsPath)Path to append to.
bezier (BezierF)Bezier curve to add.

AddCircle

#Example
public static void AddCircle(this GraphicsPath path, CircleF circle)
Add a circle to the graphics path.
path (GraphicsPath)Path to add to.
circle (CircleF)Circle to add.

AddCurve

#Example
public static void AddCurve(this GraphicsPath path, Curve curve, float accuracy)
Add a Rhino curve to the path.
path (GraphicsPath)Path to add to.
curve (Curve)Curve to add.
accuracy (float)Accuracy.

AddEllipse

#Example
public static void AddEllipse(this GraphicsPath path, EllipseF ellipse)
Add an ellipse to the graphics path.
path (GraphicsPath)Path to extend.
ellipse (EllipseF)Ellipse to add.

AddLine

#Example
public static void AddLine(this GraphicsPath path, LineF line)
Add a line to this path.
path (GraphicsPath)
line (LineF)

AddRoundedUpperBar

#Example
public static void AddRoundedUpperBar(this GraphicsPath path, RectangleF bounds, float radiusLeft, float radiusRight)
Add the outline of a bar with rounded corners on the top. It is the responsibility of the caller to not pick radii which add up to more than the width of the bounds.
path (GraphicsPath)Path to append to. Probably best if it's empty.
bounds (RectangleF)Bounds of bar.
radiusLeft (float)Radius of the top left corner.
radiusRight (float)Radius of the top right corner.

RoundedBottomPath

#Example
public static GraphicsPath RoundedBottomPath(this RectangleF rec, CornerRadii radii, float height)
Gets a graphics path representing the contents of the bottom part of this rectangle along with rounded corners. Note that the height in this case is measured upwards from the bottom of the rectangle.
rec (RectangleF)
radii (CornerRadii)
height (float)
Graphics path or null if no solution is possible with the given constraints.

RoundedTopPath

#Example
public static GraphicsPath RoundedTopPath(this RectangleF rec, CornerRadii radii, float height)
Gets a graphics path representing the contents of the top part of this rectangle along with rounded corners.
rec (RectangleF)
radii (CornerRadii)
height (float)
Graphics path or null if no solution is possible with the given constraints.