How to use Line predefine SVG shape in XML

In this article I have describe about single Line in XML
  • 1564

Read about SVG here

Read about SVG shape here

Line predefine SVG shape in XML

<line> is use to create a simple Line.

Example

<?xml version="1.0" encoding="utf-8" ?>

<html>

  <body>

    <svg xmlns="http://www.w3.org/2000/svg" version="1.1">

      <line x1="20" y1="20" x2="200" y2="200"

       style="stroke:rgb(255,0,0);stroke-width:2"/>

    </svg>

  </body>

</html>

Output

SVG 6.jpg

Define the code

  • Xml define the namespace and version use the program.
  • x1 define the start line x-axis and x2 define end line x-axis.
  • y1  define the start line y-axis and y2 define end line y-axis.

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

© 2019 DotNetHeaven. All rights reserved.