Export (0) Print
Expand All
a
b
c
cx
cy
d
dx
dy
e
f
fx
fy
id
in1
in2
k1
k2
k3
k4
r1
r2
x
x1
x2
y
y1
y2
z
Expand Minimize

rx attribute | rx property

Gets or sets the x-axis radius of an ellipse.

Scalable Vector Graphics: Basic Shapes, Section 9.8.3Internet Explorer 9

Syntax

HTML
<element rx="p" ... >
JavaScript
p = object.rx

Property values

Type: Object

The x-axis radius of the ellipse. A value of zero disables element rendering. A negative value is an error.

Standards information

Examples

The following ellipse, centered within a 400 by 400 pixel square, has a major axis of 400 pixels (that is, 2·rx) and a minor axis of 300 pixels (that is, 2·ry).


<?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="400px" height="400px" 
     viewBox="0 0 400 400" 
     version="1.1" xmlns="http://www.w3.org/2000/svg">
  
  <desc>Major and Minor Axes of an SVG Ellipse</desc>
  
  <rect width="100%" height="100%" style="stroke: red; fill: none;"/>
  <ellipse cx="200" cy="200" rx="200" ry="150" style="fill: none; stroke: black;"/>
  	
</svg>

See also

SVGEllipseElement

 

 

Show:
© 2014 Microsoft