Stay organized with collections
Save and categorize content based on your preferences.
blockly > utils > svgPaths
utils.svgPaths namespace
Functions
Function |
Description |
arc(command, flags, radius, point) |
Draw an elliptical arc curve. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Elliptical_Arc_Curve |
curve(command, points) |
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. |
line(points) |
Draw multiple lines connecting all of the given points in order. This is equivalent to a series of 'l' commands. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands |
lineOnAxis(command, val) |
Draw a horizontal or vertical line. The first argument specifies the direction and whether the given position is relative or absolute. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#LineTo_path_commands |
lineTo(dx, dy) |
Draw a line from the current point to the end point, which is the current point shifted by dx along the x-axis and dy along the y-axis. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands |
moveBy(dx, dy) |
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 |
moveTo(x, y) |
Move the cursor to the given position without drawing a line. The coordinates are absolute. These coordinates are unitless and hence in the user coordinate system. See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands |
point(x, y) |
Create a string representing the given x, y pair. It does not matter whether the coordinate is relative or absolute. The result has leading and trailing spaces, and separates the x and y coordinates with a comma but no space. |
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.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-18 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."]]