How to create Ellipse in XML

In this article I have describe about example of Ellipse in XML
  • 2192

Read about SVG here

Read about SVG shape hear

SVG Ellipse <ellipse>

The <ellipse> is use to create a Ellipse:

Example 1:

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

<html>

  <body>

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

      <ellipse cx="180" cy="80" rx="100" ry="50"

       style="fill:yellow;stroke:purple;stroke-width:2"/>

    </svg>

  </body>

</html>

Output

SVG El6.jpg

Define the code

  • Xml define the namespace and version use the program.
  • The cx and cy defines the x and y coordinates center of the circle .
  • ry is define the vertical radius
  • rx is define the horizontal radius.

Example 2:

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

<html>

  <body>

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

      <ellipse cx="125" cy="80" rx="120" ry="30" style="fill:purple"/>

      <ellipse cx="120" cy="40" rx="90" ry="20" style="fill:lime"/>

    </svg>

  </body>

</html>

Output

SVG 4.jpg
Define the code

This is the combination of two elipse

  • Xml define the namespace and version use the program.
  • The cx and cy defines the x and y coordinates center of the circle .
  • ry is define the vertical radius
  • rx is define the horizontal radius.

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.