blockly > utils > svgPaths > moveBy
utils.svgPaths.moveBy() function
Move the cursor to the given position without drawing a line. Coordinates are relative. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
Signature:
export declare function moveBy(dx: number, dy: number): string;
Parameters
Parameter |
Type |
Description |
dx |
number |
The relative x coordinate. |
dy |
number |
The relative y coordinate. |
Returns:
string
A string of the format ' m dx,dy '
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `moveBy` function generates an SVG path command to move the cursor without drawing, using relative coordinates."],["It accepts `dx` and `dy` parameters representing the relative horizontal and vertical movement, respectively."],["The function returns a string in the format ' m dx,dy ', which can be incorporated into an SVG path string."],["The coordinates provided are unitless and within the user coordinate system."]]],[]]