menu

WinForms

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

    Show / Hide Table of Contents

    Class PathShape

    Represents path shape.

    Inheritance
    System.Object
    EntityBase
    XDLSSerializableBase
    WidgetBase
    Shape
    PathShape
    Implements
    IEntityBase
    IXDLSSerializable
    IShape
    ILeafWidget
    IWidget
    Inherited Members
    EntityBase.Document
    EntityBase.DocumentEx
    EntityBase.Owner
    EntityBase.SetOwner(IEntityBase)
    Shape.ApplyStyle(String)
    Shape.ApplyTransform(CustomGraphics)
    Shape.CreateLayoutInfo()
    Shape.InitXDLSHolder()
    Shape.m_canvas
    Shape.Measure(CustomGraphics)
    Shape.ResetTransform(CustomGraphics)
    Shape.ShapeFormat
    Shape.StyleName
    Shape.Transform
    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()
    WidgetBase.DrawImpl(CustomGraphics, LayoutedWidget)
    WidgetBase.IWidget.LayoutInfo
    WidgetBase.m_layoutInfo
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.m_id
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DLS
    Assembly: Syncfusion.DLS.Base.dll
    Syntax
    public class PathShape : Shape, IEntityBase, IXDLSSerializable, IShape, ILeafWidget, IWidget
    Remarks

    Supported by Essential PDF only.

    Constructors

    PathShape(Canvas)

    Creates a new PathShape object.

    Declaration
    public PathShape(Canvas canvas)
    Parameters
    Type Name Description
    Canvas canvas

    Parent canvas.

    Properties

    FillMode

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

    Declaration
    public FillMode FillMode { get; set; }
    Property Value
    Type
    System.Drawing.Drawing2D.FillMode

    PathPoints

    Gets the points in the path.

    Declaration
    public PointF[] PathPoints { get; }
    Property Value
    Type
    System.Drawing.PointF[]

    PathTypes

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

    Declaration
    public PathPointType[] PathTypes { get; }
    Property Value
    Type
    System.Drawing.Drawing2D.PathPointType[]

    Methods

    AddPoint(PointF, PathPointType)

    Adds point to the path shape.

    Declaration
    public void AddPoint(PointF point, PathPointType pointType)
    Parameters
    Type Name Description
    System.Drawing.PointF point

    New point inside path.

    System.Drawing.Drawing2D.PathPointType pointType

    Type of the point.

    CloseFigure()

    Closes current figure inside the shape.

    Declaration
    public void CloseFigure()
    Remarks

    Use this method after filling path shape except in the case of importing data from GraphicsPath object.

    FromGraphicsPath(GraphicsPath)

    Converts graphics path object to PathShape.

    Declaration
    public void FromGraphicsPath(GraphicsPath path)
    Parameters
    Type Name Description
    System.Drawing.Drawing2D.GraphicsPath path

    Graphics Path object.

    Remarks

    All data of the PathShape, stored before will be lost.

    ReadXmlAttributes(IXDLSAttributeReader)

    Declaration
    protected override void ReadXmlAttributes(IXDLSAttributeReader reader)
    Parameters
    Type Name Description
    IXDLSAttributeReader reader
    Overrides
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)

    ReadXmlContent(IXDLSContentReader)

    Overloaded. Reads image from the XML.

    Declaration
    protected override bool ReadXmlContent(IXDLSContentReader reader)
    Parameters
    Type Name Description
    IXDLSContentReader reader

    Rader object.

    Returns
    Type Description
    System.Boolean

    True always.

    Overrides
    Shape.ReadXmlContent(IXDLSContentReader)

    Start(PointF)

    Starts path shape.

    Declaration
    public void Start(PointF startPoint)
    Parameters
    Type Name Description
    System.Drawing.PointF startPoint

    Starting point.

    Remarks

    Use this method before filling path shape except in the case of importing data from GraphicsPath object.

    ToGraphicsPath()

    Creates GraphicsPath object.

    Declaration
    public GraphicsPath ToGraphicsPath()
    Returns
    Type
    System.Drawing.Drawing2D.GraphicsPath

    ToGraphicsPath(PointF[], PathPointType[], FillMode)

    Creates GraphicsPath object.

    Declaration
    public GraphicsPath ToGraphicsPath(PointF[] points, PathPointType[] types, FillMode fillMode)
    Parameters
    Type Name Description
    System.Drawing.PointF[] points

    Array of points in the path.

    System.Drawing.Drawing2D.PathPointType[] types

    Types of the points.

    System.Drawing.Drawing2D.FillMode fillMode

    Fill mode of the path.

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Created graphics path object.

    WriteXmlAttributes(IXDLSAttributeWriter)

    Declaration
    protected override void WriteXmlAttributes(IXDLSAttributeWriter writer)
    Parameters
    Type Name Description
    IXDLSAttributeWriter writer
    Overrides
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)

    WriteXmlContent(IXDLSContentWriter)

    Overloaded. Writes image to XML.

    Declaration
    protected override void WriteXmlContent(IXDLSContentWriter writer)
    Parameters
    Type Name Description
    IXDLSContentWriter writer

    Writer object.

    Overrides
    Shape.WriteXmlContent(IXDLSContentWriter)

    Explicit Interface Implementations

    IWidget.Draw(CustomGraphics, LayoutedWidget)

    Declaration
    void IWidget.Draw(CustomGraphics cg, LayoutedWidget ltWidget)
    Parameters
    Type Name Description
    CustomGraphics cg
    LayoutedWidget ltWidget

    Implements

    IEntityBase
    IXDLSSerializable
    IShape
    ILeafWidget
    IWidget
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved