Skip to content

textmode.js / Textmodifier / bezierCurve

Method: bezierCurve()

ts
bezierCurve(
   x1, 
   y1, 
   cp1x, 
   cp1y, 
   cp2x, 
   cp2y, 
   x2, 
   y2): void;

Draw a smooth cubic Bezier curve between two points. The curve thickness is controlled by the current lineWeight setting.

Parameters

ParameterTypeDescription
x1numberStart point X coordinate in grid cells.
y1numberStart point Y coordinate in grid cells.
cp1xnumberFirst control point X coordinate in grid cells.
cp1ynumberFirst control point Y coordinate in grid cells.
cp2xnumberSecond control point X coordinate in grid cells.
cp2ynumberSecond control point Y coordinate in grid cells.
x2numberEnd point X coordinate in grid cells.
y2numberEnd point Y coordinate in grid cells.

Returns

void

Example