menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PathFactory - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PathFactory

    Path factory

    Inheritance
    System.Object
    PathFactory
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class PathFactory

    Constructors

    PathFactory()

    Declaration
    public PathFactory()

    Methods

    CreateArc(PointF, SizeF, Single, Single)

    Creates GraphicsPath with arc shape

    Declaration
    public static GraphicsPath CreateArc(PointF point, SizeF size, float fStartAngle, float fSweepAngle)
    Parameters
    Type Name Description
    System.Drawing.PointF point

    upper left point of arc's bounding rectangle

    System.Drawing.SizeF size

    arc's bounding rectangle size

    System.Single fStartAngle

    starting angle of the arc

    System.Single fSweepAngle

    angle between startAngle and the end of the arc

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateArc(RectangleF, Single, Single)

    Creates GraphicsPath with arc shape

    Declaration
    public static GraphicsPath CreateArc(RectangleF rectBounding, float fStartAngle, float fSweepAngle)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rectBounding

    arc's bounding rectangle

    System.Single fStartAngle

    starting angle of the arc

    System.Single fSweepAngle

    angle between startAngle and the end of the arc

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    CreateArc(Single, Single, Single, Single, Single, Single)

    Creates GraphicsPath with arc shape

    Declaration
    public static GraphicsPath CreateArc(float fX, float fY, float fWidth, float fHeight, float fStartAngle, float fSweepAngle)
    Parameters
    Type Name Description
    System.Single fX

    upper left X-coordinate of arc's bounding rectangle

    System.Single fY

    upper left Y-coordinate of arc's bounding rectangle

    System.Single fWidth

    arc's bounding rectangle width

    System.Single fHeight

    arc's bounding rectangle height

    System.Single fStartAngle

    starting angle of the arc

    System.Single fSweepAngle

    angle between startAngle and the end of the arc

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateBezier(PointF, PointF, PointF, PointF)

    Creates the bezier line.

    Declaration
    public static GraphicsPath CreateBezier(PointF ptStart, PointF ptStartCtrl, PointF ptEnd, PointF ptEndCtrl)
    Parameters
    Type Name Description
    System.Drawing.PointF ptStart

    The start point.

    System.Drawing.PointF ptStartCtrl

    The start control point.

    System.Drawing.PointF ptEnd

    The end point.

    System.Drawing.PointF ptEndCtrl

    The end control point.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateBezier(PointF[])

    Creates the bezier line.

    Declaration
    public static GraphicsPath CreateBezier(PointF[] pts)
    Parameters
    Type Name Description
    System.Drawing.PointF[] pts

    The array of points.

    Returns
    Type
    System.Drawing.Drawing2D.GraphicsPath

    CreateClosedCurve(Point[])

    Creates the closed curve.

    Declaration
    public static GraphicsPath CreateClosedCurve(Point[] pts)
    Parameters
    Type Name Description
    System.Drawing.Point[] pts

    The points.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateClosedCurve(PointF[])

    Creates the closed curve.

    Declaration
    public static GraphicsPath CreateClosedCurve(PointF[] pts)
    Parameters
    Type Name Description
    System.Drawing.PointF[] pts

    The points.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateCurve(Point, Point, Point)

    Creates the curve.

    Declaration
    public static GraphicsPath CreateCurve(Point ptStart, Point ptEnd, Point ptCtrl)
    Parameters
    Type Name Description
    System.Drawing.Point ptStart

    The start point.

    System.Drawing.Point ptEnd

    The end point.

    System.Drawing.Point ptCtrl

    The CTRL point.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateCurve(Point[])

    Creates the curve.

    Declaration
    public static GraphicsPath CreateCurve(Point[] pts)
    Parameters
    Type Name Description
    System.Drawing.Point[] pts

    The points.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateCurve(PointF, PointF, PointF)

    Creates the curve.

    Declaration
    public static GraphicsPath CreateCurve(PointF ptStart, PointF ptEnd, PointF ptCtrl)
    Parameters
    Type Name Description
    System.Drawing.PointF ptStart

    The start point.

    System.Drawing.PointF ptEnd

    The end point.

    System.Drawing.PointF ptCtrl

    The control point.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateCurve(PointF[])

    Creates the curve.

    Declaration
    public static GraphicsPath CreateCurve(PointF[] pts)
    Parameters
    Type Name Description
    System.Drawing.PointF[] pts

    The points.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    CreateEllipse(PointF, PointF)

    Creates GraphicsPath with ellipse shape

    Declaration
    public static GraphicsPath CreateEllipse(PointF ptUpperLeft, PointF ptLowerRight)
    Parameters
    Type Name Description
    System.Drawing.PointF ptUpperLeft

    adding rectangle upperleft point

    System.Drawing.PointF ptLowerRight

    adding rectangle lowerright point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateEllipse(PointF, SizeF)

    Creates GraphicsPath with ellipse shape

    Declaration
    public static GraphicsPath CreateEllipse(PointF ptLocation, SizeF szSize)
    Parameters
    Type Name Description
    System.Drawing.PointF ptLocation

    GraphicsPath's location

    System.Drawing.SizeF szSize

    GraphicsPath's size

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted Graphicspath

    CreateEllipse(RectangleF)

    Creates GraphicsPath with ellipse shape

    Declaration
    public static GraphicsPath CreateEllipse(RectangleF rectBounding)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rectBounding

    Ellipse bounding rectangle

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateEllipse(Single, Single, Single, Single)

    Creates GraphicsPath with ellipse shape

    Declaration
    public static GraphicsPath CreateEllipse(float fX, float fY, float fWidth, float fHeight)
    Parameters
    Type Name Description
    System.Single fX

    GraphicsPath's X-coordinate

    System.Single fY

    GraphicsPath's Y-coordinate

    System.Single fWidth

    GraphicsPath's width

    System.Single fHeight

    GraphicsPath's height

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateLine(Point, Point)

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateLine(Point ptStart, Point ptEnd)
    Parameters
    Type Name Description
    System.Drawing.Point ptStart

    Line's start point

    System.Drawing.Point ptEnd

    Line's end point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Exceptions
    Type Condition
    System.ArgumentException

    CreateLine(Point[])

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateLine(Point[] points)
    Parameters
    Type Name Description
    System.Drawing.Point[] points

    points to create GraphicsPath from

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Remarks

    Only first to points are taken into account.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    CreateLine(PointF, PointF)

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateLine(PointF ptStart, PointF ptEnd)
    Parameters
    Type Name Description
    System.Drawing.PointF ptStart

    Line's start point

    System.Drawing.PointF ptEnd

    Line's end point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Exceptions
    Type Condition
    System.ArgumentException

    CreateLine(PointF[])

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateLine(PointF[] points)
    Parameters
    Type Name Description
    System.Drawing.PointF[] points

    points to create GraphicsPath from

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Remarks

    Only first to points are taken into account.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    CreateOrthogonalLine(Point, Point)

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateOrthogonalLine(Point ptStart, Point ptEnd)
    Parameters
    Type Name Description
    System.Drawing.Point ptStart

    Line's start point

    System.Drawing.Point ptEnd

    Line's end point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Exceptions
    Type Condition
    System.ArgumentException

    CreateOrthogonalLine(Point[])

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateOrthogonalLine(Point[] points)
    Parameters
    Type Name Description
    System.Drawing.Point[] points

    points to create GraphicsPath from

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Remarks

    Only first to points are taken into account.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    CreateOrthogonalLine(PointF, PointF)

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateOrthogonalLine(PointF ptStart, PointF ptEnd)
    Parameters
    Type Name Description
    System.Drawing.PointF ptStart

    Line's start point

    System.Drawing.PointF ptEnd

    Line's end point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Exceptions
    Type Condition
    System.ArgumentException

    CreateOrthogonalLine(PointF[])

    Creates GraphicsPath with line shape.

    Declaration
    public static GraphicsPath CreateOrthogonalLine(PointF[] points)
    Parameters
    Type Name Description
    System.Drawing.PointF[] points

    points to create GraphicsPath from

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    Remarks

    Only first to points are taken into account.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    CreateRectangle(PointF, PointF)

    Creates GraphicsPath with rectangle shape

    Declaration
    public static GraphicsPath CreateRectangle(PointF ptUpperLeft, PointF ptLowerRight)
    Parameters
    Type Name Description
    System.Drawing.PointF ptUpperLeft

    adding rectangle upperleft point

    System.Drawing.PointF ptLowerRight

    adding rectangle lowerright point

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateRectangle(PointF, SizeF)

    Creates GraphicsPath with rectangle shape

    Declaration
    public static GraphicsPath CreateRectangle(PointF ptLocation, SizeF szSize)
    Parameters
    Type Name Description
    System.Drawing.PointF ptLocation

    GraphicsPath's location

    System.Drawing.SizeF szSize

    GraphicsPath's size

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateRectangle(RectangleF)

    Creates GraphicsPath with rectangle shape

    Declaration
    public static GraphicsPath CreateRectangle(RectangleF rect)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rect

    Rectangle to add

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateRectangle(Single, Single, Single, Single)

    Creates GraphicsPath with rectangle shape

    Declaration
    public static GraphicsPath CreateRectangle(float fX, float fY, float fWidth, float fHeight)
    Parameters
    Type Name Description
    System.Single fX

    GraphicsPath's X-coordinate

    System.Single fY

    GraphicsPath's Y-coordinate

    System.Single fWidth

    GraphicsPath's width

    System.Single fHeight

    GraphicsPath's height

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath

    CreateRoundRectangle(PointF, PointF, Single)

    Create GraphicsPath with round rectangle shape.

    Declaration
    public static GraphicsPath CreateRoundRectangle(PointF ptUpperLeft, PointF ptLowerRight, float fCurveRadius)
    Parameters
    Type Name Description
    System.Drawing.PointF ptUpperLeft

    Adding rectangle upperleft point.

    System.Drawing.PointF ptLowerRight

    Adding rectangle lowerright point.

    System.Single fCurveRadius

    The curve radius.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath.

    CreateRoundRectangle(PointF, SizeF, Single)

    Create GraphicsPath with round rectangle shape.

    Declaration
    public static GraphicsPath CreateRoundRectangle(PointF ptLocation, SizeF szSize, float fCurveRadius)
    Parameters
    Type Name Description
    System.Drawing.PointF ptLocation

    The location.

    System.Drawing.SizeF szSize

    The size.

    System.Single fCurveRadius

    The curve radius.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath.

    CreateRoundRectangle(RectangleF, Single)

    Create GraphicsPath with round rectangle shape.

    Declaration
    public static GraphicsPath CreateRoundRectangle(RectangleF rect, float fCurveRadius)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rect

    The rectangle.

    System.Single fCurveRadius

    The curve radius.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath.

    CreateRoundRectangle(Single, Single, Single, Single, Single)

    Create GraphicsPath with round rectangle shape.

    Declaration
    public static GraphicsPath CreateRoundRectangle(float fX, float fY, float fWidth, float fHeight, float fCurveRadius)
    Parameters
    Type Name Description
    System.Single fX

    GraphicsPath's X-coordinate.

    System.Single fY

    GraphicsPath's Y-coordinate.

    System.Single fWidth

    GraphicsPath's width.

    System.Single fHeight

    GraphicsPath's height.

    System.Single fCurveRadius

    The curve radius.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Resulted GraphicsPath.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved