Class PathShape
Represents path shape.
Inherited Members
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
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
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
WriteXmlContent(IXDLSContentWriter)
Overloaded. Writes image to XML.
Declaration
protected override void WriteXmlContent(IXDLSContentWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IXDLSContentWriter | writer | Writer object. |
Overrides
Explicit Interface Implementations
IWidget.Draw(CustomGraphics, LayoutedWidget)
Declaration
void IWidget.Draw(CustomGraphics cg, LayoutedWidget ltWidget)
Parameters
Type | Name | Description |
---|---|---|
CustomGraphics | cg | |
LayoutedWidget | ltWidget |