Research Survey: Tell us about your experience with Blockly
Start survey
Stay organized with collections
Save and categorize content based on your preferences.
blockly > utils > svgPaths > arc
utils.svgPaths.arc() function
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
Signature:
export declare function arc(command: string, flags: string, radius: number, point: string): string;
Parameters
Parameter |
Type |
Description |
command |
string |
The command string. Either 'a' or 'A'. |
flags |
string |
The flag string. See the MDN documentation for a description and examples. |
radius |
number |
The radius of the arc to draw. |
point |
string |
The point to move the cursor to after drawing the arc, specified either in absolute or relative coordinates depending on the command. |
Returns:
string
A string of the format 'command radius radius flags point'
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.
[[["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."],[[["`utils.svgPaths.arc()` is a function that generates SVG path strings for drawing elliptical arcs."],["It takes parameters for command type, flags, radius, and endpoint to define the arc's properties."],["The function returns a formatted string ready to be used within an SVG path's `d` attribute."],["This utility simplifies creating elliptical arc curves in Blockly, utilizing a coordinate system relative to the user's view."],["Refer to MDN documentation for detailed information regarding SVG elliptical arc curve syntax and flag options."]]],[]]