Class BezierSegment
Represents the bezier segment of the connector.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class BezierSegment : StraightSegment, IDiagramObject, ICloneable
Constructors
BezierSegment()
Initializes a new instance of the BezierSegment.
Declaration
public BezierSegment()
BezierSegment(BezierSegment)
Creates a new instance of the BezierSegment from the given BezierSegment.
Declaration
public BezierSegment(BezierSegment src)
Parameters
Type | Name | Description |
---|---|---|
BezierSegment | src | BezierSegment |
Properties
Point1
Gets or sets the first control point of the bezier connector.
Declaration
public DiagramPoint Point1 { get; set; }
Property Value
Type |
---|
DiagramPoint |
Examples
Connector connector = new Connector()
{
ID = "connector1",
Type = ConnectorSegmentType.Bezier,
Segments=new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment(){Type=ConnectorSegmentType.Bezier,
Point1=new DiagramPoint{X=125, Y=75},
Point2=new DiagramPoint{X=225, Y=75 } }
}
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
};
Point2
Gets or sets the second control point of the bezier connector.
Declaration
public DiagramPoint Point2 { get; set; }
Property Value
Type |
---|
DiagramPoint |
Examples
Connector connector = new Connector()
{
ID = "connector1",
Type = ConnectorSegmentType.Bezier,
Segments=new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment(){Type=ConnectorSegmentType.Bezier,
Point1=new DiagramPoint{X=125, Y=75},
Point2=new DiagramPoint{X=225, Y=75 } }
}
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
};
Vector1
Defines the length and angle between the source point and the first control point of the diagram.
Declaration
public Vector Vector1 { get; set; }
Property Value
Type |
---|
Vector |
Examples
Connector connector = new Connector()
{
ID = "connector1",
Type = ConnectorSegmentType.Bezier,
Segments=new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment(){Type=ConnectorSegmentType.Bezier,
Vector1=new Vector{Angle=90, Distance=75 },
Vector2=new Vector{Angle=90, Distance=75 }
}
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
};
Vector2
Defines the length and angle between the target point and the second control point of the diagram.
Declaration
public Vector Vector2 { get; set; }
Property Value
Type |
---|
Vector |
Examples
Connector connector = new Connector()
{
ID = "connector1",
Type = ConnectorSegmentType.Bezier,
Segments=new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment(){Type=ConnectorSegmentType.Bezier,
Vector1=new Vector{Angle=90, Distance=75 },
Vector2=new Vector{Angle=90, Distance=75 }
}
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
TargetPoint = new DiagramPoint() { X = 200, Y = 200 },
};
Methods
Clone()
Creates a new bezier segment that is a copy of the current segment.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | BezierSegment |
Overrides
Implements
System.ICloneable