dojox/gfx/bezierutils (version 1.10)

See the dojox/gfx/bezierutils reference documentation for more information.

Method Summary

  • computeLength(points) Returns the length of the given bezier curve.
  • distance(x1,y1,x2,y2) Returns the distance between the specified points.
  • splitBezierAtT(points,t)
  • tAtLength(points,length) Returns the t corresponding to the given length for the specified bezier curve.

Methods

computeLength(points)

Returns the length of the given bezier curve.

Parameter Type Description
points Number[]

The bezier points. Should be [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y] for a cubic bezier curve or [p1x, p1y, cx, cy, p2x, p2y] for a quadratic bezier curve.

Returns:number
distance(x1,y1,x2,y2)

Returns the distance between the specified points.

Parameter Type Description
x1 undefined
y1 undefined
x2 undefined
y2 undefined
Returns:undefined
splitBezierAtT(points,t)
Parameter Type Description
points undefined
t undefined
Returns:undefined
tAtLength(points,length)

Returns the t corresponding to the given length for the specified bezier curve.

Parameter Type Description
points Number[]

The bezier points. Should be [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y] for a cubic bezier curve or [p1x, p1y, cx, cy, p2x, p2y] for a quadratic bezier curve.

length Number

The length.

Returns:number
Error in the documentation? Can’t find what you are looking for? Let us know!