blockly > utils > svgPaths > 曲線
utils.svgPaths.curve() 函式
繪製立方曲線或二次曲線。請參閱 developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Cubic_B%C3%A9zier_Curve 這些座標為無單位,因此使用者座標系統。
Signature:
export declare function curve(command: string, points: string[]): string;
參數
參數 | 類型 | 說明 |
---|---|---|
Command 鍵 | 字串 | 要使用的指令。必須是下列任一值:c、C、s、S、q、Q。 |
points | string[] | 陣列,包含所有要傳送至曲線指令的點。點會以字串「x, y」的格式表示。 |
傳回:
字串
定義一或多個貝茲曲線的字串。如需確切格式,請參閱 MDN 說明文件。