How to use Path predefine SVG shape in XML
Posted in XML | SVG July 05, 2019
In this article I have describe about a examples of Path in XML
Read about SVG here
Read about SVG shape here
Polygon predefine SVG shape in XML
Predefine commands are available for Path in XML
- M = moveto
- L = lineto
- H = horizontal lineto
- V = vertical lineto
- C = curveto
- S = smooth curveto
- Q = quadratic Bézier curve
- T = smooth quadratic Bézier curveto
- A = elliptical Arc
- Z = closepath
These commands are only use Capital Letter. These letters are show the position of path
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<path d="M150 10 L75 200 L225 200 Z" fill="red" />
Define the code
- Xml define the namespace and version use the program.
- The d defines each corner of the Path.
- Fill is define color of path.
- M,L is define position of path.
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here