From http://www.w3schools.com (Copyright Refsnes Data)

SVG circle Element


SVG Reference Complete SVG Reference

Definition and Usage

The SVG circle element is used to create a circle.

The cx and cy attributes define the x and y coordinates of the center of the circle. If cx and cy are omitted, the circle's center is set to (0, 0).

The r attribute defines the radius of the circle.


Example 1

This example creates a circle.

Copy the following code into Notepad and save the file as "circle_1.svg". Place the file in your Web directory:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

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

<circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red"/>

</svg>

View example


SVG Reference Complete SVG Reference

From http://www.w3schools.com (Copyright Refsnes Data)