Skip to main content

Home > @jsplumb/connector-bezier > BezierSegment

BezierSegment class#

Signature:

export declare class BezierSegment extends AbstractSegment 

Extends: AbstractSegment

Constructors#

ConstructorModifiersDescription
(constructor)(params)Constructs a new instance of the BezierSegment class

Properties#

PropertyModifiersTypeDescription
cp1xnumber
cp1ynumber
cp2xnumber
cp2ynumber
curveCurve
lengthnumber
segmentTypestaticstring
typestring

Methods#

MethodModifiersDescription
findClosestPointOnPath(x, y)
getLength()
getPath(isFirstSegment)
gradientAtPoint(location, absolute)returns the gradient of the segment at the given point.
lineIntersection(x1, y1, x2, y2)
pointAlongPathFrom(location, distance, absolute)
pointOnPath(location, absolute)returns the point on the segment's path that is 'location' along the length of the path, where 'location' is a decimal from 0 to 1 inclusive.