研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >实用程序 >svgPaths >lineTo
utils.svgPaths.lineTo() 函数
画一条从当前点到终点的线,即当前点沿 x 轴移动的点 dx,沿 y 轴移动 dy。这些坐标是无单位的,因此是用户坐标系中的坐标。请参阅 developer.mozilla.org/zh-CN/docs/Web/SVG/Tutorial/Paths#Line_commands
Signature:
export declare function lineTo(dx: number, dy: number): string;
参数
参数 |
类型 |
说明 |
dx |
number |
相对 x 坐标。 |
Y |
number |
相对 y 坐标。 |
返回:
字符串
“l dx,dy '
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-22。
[null,null,["最后更新时间 (UTC):2024-08-22。"],[[["The `utils.svgPaths.lineTo()` function generates an SVG path command to draw a line from the current point to a new point relative to the current position."],["It takes two arguments: `dx` (the change in x-coordinate) and `dy` (the change in y-coordinate), both in user coordinate units."],["The function returns a string representing the SVG path command for drawing the line, formatted as ' l dx,dy '."],["This command is used within SVG path definitions to create line segments, contributing to the overall shape or drawing within the SVG."]]],[]]