Each path must start with the MoveTo command
MoveTo, LineTo and Closepath
<path d= "M ten L 10z"/>
The coordinates of the uppercase command are absolute, and the coordinates of the lowercase command are relative. Other information:
The 1.z (closepath) command has no coordinates, and it has the same case effect.
2. If you start the path with a lowercase m (moveto), its coordinates are resolved to an absolute position because there is no reference position to calculate the relative position.
Horizontal and vertical lines are common enough to be quick commands. The path can specify a horizontal line using the H command plus the absolute x coordinate, or the H command plus the relative X coordinate. Similarly, the vertical line can be specified using the V command plus the absolute y-coordinate, or the V command plus the relative y-coordinate.
The following path draws a rectangle with a width of 15 units and a height of 25 units.
<path d= "M (h) h-15 Z"/>
We can also place multiple coordinate values behind the horizontal LineTo and vertical lineto commands, but only when you use line markers, and H 25 35 45 and H 45 are the same, and v 11 13 15 and V 39 are the same.
All unnecessary whitespace can be eliminated. There is no need for whitespace after the command letter, because all commands are a single letter. There is no need for whitespace between numbers and commands because the command letters cannot be part of a number. There is no need for white space between positive and negative numbers, because the negative number of the preceding minus is not part of a positive number.
The arc command starts with the letter A (abbreviated for absolute coordinates) or a (abbreviated relative coordinates) followed by the following 7 parameters.
• The X-radius and Y-radius of the ellipse where the point is located, separated by commas.
• The x-axis rotation angle of the ellipse is x-axis-rotation.
Large-arc-flag, if the angle of the arc is less than 180 degrees, it is 0, or 1 if the angle of the arc is greater than or equal to 180 degrees.
Sweep-flag, if an arc is required to draw at a negative angle, it is 0 and is drawn at a positive angle of 1.
• The x-coordinate and y-coordinate of the end point (the starting point is determined by the last drawn dot or the last MoveTo command).
SVG Note----------Path article