blockly > utils > svgPaths > lineTo
Funktion utils.svgPaths.lineTo()
Zeichnen Sie eine Linie vom aktuellen Punkt zum Endpunkt. Dabei handelt es sich um den aktuellen Punkt, der entlang der x-Achse um dx und entlang der y-Achse um dy verschoben wird. Diese Koordinaten haben keine Einheit und sind daher im Koordinatensystem des Nutzers enthalten. Weitere Informationen findest du unter developer.Mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands.
Unterschrift:
export declare function lineTo(dx: number, dy: number): string;
Parameter
Parameter |
Typ |
Beschreibung |
dx |
Zahl |
Die relative X-Koordinate. |
T. |
Zahl |
Die relative y-Koordinate. |
Gibt zurück:
String
Eine Zeichenfolge im Format ' L dx,dy '
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-22 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-22 (UTC)."],[[["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."]]],[]]