blockly > utils > svgPaths > curve

utils.svgPaths.curve() function

Draw a cubic or quadratic curve. See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Cubic_B%C3%A9zier_Curve These coordinates are unitless and hence in the user coordinate system.

Signature:

export declare function curve(command: string, points: string[]): string;

Parameters

Parameter Type Description
command string The command to use. Should be one of: c, C, s, S, q, Q.
points string[] An array containing all of the points to pass to the curve command, in order. The points are represented as strings of the format ' x, y '.

Returns:

string

A string defining one or more Bezier curves. See the MDN documentation for exact format.