Class Vector
Represents a vector that describes the length and angle between the control point and the start point of a bezier segment.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class Vector : DiagramObject, IDiagramObject, ICloneable
Remarks
This class is used in conjunction with bezier segments to determine their direction and curvature.
Constructors
Vector()
Initializes a new instance of the Vector.
Declaration
public Vector()
Vector(Vector)
Creates a new instance of the Vector from the given Vector.
Declaration
public Vector(Vector src)
Parameters
Type | Name | Description |
---|---|---|
Vector | src | A Vector instance to copy. |
Properties
Angle
Gets or sets the angle between the connector endpoint and control point of the bezier segment.
Declaration
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the angle in degrees. The default value is |
Remarks
Modifying this property influences the curvature of the bezier segment.
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 },
};
Distance
Gets or sets the distance between the connector endpoint and control point of the bezier segment.
Declaration
public double Distance { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the distance. The default value is |
Remarks
This property defines the length of the control line of the bezier curve, directly affecting its curvature.
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 vector that is the copy of the current vector.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new instance of the Vector class. |