previous next contents elements attributes properties index

30 April 2002

# 4 Basic Data Types and Interfaces

### Contents

## 4.1 Basic data types

The common data types for SVG's properties and attributes fall into the following categories:

- <integer>: An <integer> is specified as an optional sign character ('+' or '-') followed by one or more digits "0" to "9". If the sign character is not present, the number is non-negative.
  Unless stated otherwise for a particular attribute or property, the range for a <integer> encompasses (at a minimum) -2147483648 to 2147483647.
  Within the SVG DOM, an <integer> is represented as an long or an SVGAnimatedInteger.
- <number> (real number value): The specification of real number values is different for property values than for XML attribute values.
  - CSS2 [CSS2] states that a property value which is a <number> is specified in decimal notation (i.e., a <decimal-number>), which consists of either an <integer>, or an optional sign character followed by zero or more digits followed by a dot (.) followed by one or more digits. Thus, for conformance with CSS2, any property in SVG which accepts <number> values is specified in decimal notation only.
  - For SVG's XML attributes, to provide as much scalability in numeric values as possible, real number values can be provided either in decimal notation or in scientific notation (i.e., a <scientific-number>), which consists of a <decimal-number> immediately followed by the letter "e" or "E" immediately followed by an <integer>.
  Unless stated otherwise for a particular attribute or property, a <number> has the capacity for at least a single-precision floating point number (see [ICC32]) and has a range (at a minimum) of -3.4e+38F to +3.4e+38F.
  It is recommended that higher precision floating point storage and computation be performed on operations such as coordinate system transformations to provide the best possible precision and to prevent round-off errors.
  Conforming High-Quality SVG Viewers are required to use at least double-precision floating point (see [ICC32]) for intermediate calculations on certain numerical operations.
  Within the SVG DOM, a <number> is represented as a float or an SVGAnimatedNumber.
- <length>: A length is a distance measurement. The format of a <length> is a <number> optionally followed immediately by a unit identifier. (Note that the specification of a <number> is different for property values than for XML attribute values.)
  If the <length> is expressed as a value without a unit identifier (e.g., 48), then the <length> represents a distance in the current user coordinate system.
  If one of the unit identifiers is provided (e.g., 12mm), then the <length> is processed according to the description in Units.
  Percentage values (e.g., 10%) depend on the particular property or attribute to which the percentage value has been assigned. Two common cases are: (a) when a percentage value represents a percent of the viewport (refer to the section that discusses Units in general), and (b) when a percentage value represents a percent of the bounding box on a given object (refer to the section that describes Object bounding box units).
  Within the SVG DOM, a <length> is represented as an SVGLength or an SVGAnimatedLength.
- <coordinate>: A <coordinate> represents a <length> in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates).
  Within the SVG DOM, a <coordinate> is represented as an SVGLength or an SVGAnimatedLength since both values have the same syntax.
- <list of xxx> (where xxx represents a value of some type): A list consists of a separated sequence of values. The specification of lists is different for property values than for XML attribute values.
  - Lists in property values are either comma-separated, with optional white space before or after the comma, or space-separated, as specified either in the CSS2 specification (if the property is defined there) or in this specification (if the property is not defined in the CSS2 specification).
  - Unless explicitly described differently, lists within SVG's XML attributes can be either comma-separated, with optional white space before or after the comma, or white space-separated.
  White space in lists is defined as one or more of the following consecutive characters: "space" (Unicode code 32), "tab" (9), "line feed" (10), "carriage return" (13) and "form-feed" (12).
  Within the SVG DOM, a <list of xxx> is represented by various custom interfaces, such as SVGTransformList.
  Here is a description of the grammar for a <list of xxx>:

      ListOfXXX:
          XXX
          | XXX comma-wsp ListOfXXX

      comma-wsp:
          (wsp+ comma? wsp*) | (comma wsp*)

      comma:
          ","

      wsp:
          (#x20 | #x9 | #xD | #xA)

  where XXX represents a particular type of value.
- <number-optional-number>: A special case of <list of xxx> where there are at least one and at most two entries in the list and the entries are of type <number>.
- <angle>: An angle value is a <number> optionally followed immediately with an angle unit identifier. Angle unit identifiers are:
  - deg: degrees
  - grad: grads
  - rad: radians
  For properties defined in [CSS2], an angle unit identifier must be provided. For SVG-specific attributes and properties, the angle unit identifier is optional. If not provided, the angle value is assumed to be in degrees.
  The corresponding SVG DOM interface definition for <angle> is an SVGAngle or an SVGAnimatedAngle.
- <color>: The basic type <color> is a CSS2-compatible specification for a color in the sRGB color space [SRGB]. <color> applies to SVG's use of the 'color' property and is a component of the definitions of properties 'fill', 'stroke' 'stop-color', 'solid-color', 'flood-color' and 'lighting-color', which also offer optional ICC-based color specifications.
  SVG supports all of the syntax alternatives for <color> defined in [ CSS2-color-types], with the exception that SVG contains an expanded list of recognized color keywords names.
  A <color> is either a keyword (see Recognized color keyword names) or a numerical RGB specification.
  In addition to these color keywords, users may specify keywords that correspond to the colors used by objects in the user's environment. The normative definition of these keywords is [CSS2 system colors].
  The format of an RGB value in hexadecimal notation is a '#' immediately followed by either three or six hexadecimal characters. The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display. The format of an RGB value in the functional notation is 'rgb(' followed by a comma-separated list of three numerical values (either three integer values or three percentage values) followed by ')'. The integer value 255 corresponds to 100%, and to F or FF in the hexadecimal notation: rgb(255,255,255) = rgb(100%,100%,100%) = #FFF. White space characters are allowed around the numerical values. All RGB colors are specified in the sRGB color space (see [SRGB]). Using sRGB provides an unambiguous and objectively measurable definition of the color, which can be related to international standards (see [ COLORIMETRY]).
  The corresponding SVG DOM interface definitions for <color> are defined in [DOM2-CSS]; in particular, see the [ DOM2-CSS-RGBCOLOR]. SVG's extension to color, including the ability to specify ICC-based colors, are represented in DOM interface SVGColor.
- <paint> : The values for properties 'fill' and 'stroke' are specifications of the type of paint to use when filling or stroking a given graphics element. The available options and syntax for <paint> are described in Specifying paint.
  Within the SVG DOM, <paint> is represented as an SVGPaint.
- <percentage>: The format of a percentage value is a <number> immediately followed by a '%'. Percentage values are always relative to another value, for example a length. Each attribute or property that allows percentages also defines the reference distance measurement to which the percentage refers.
  Within the SVG DOM, a <percentage> is usually represented as an SVGLength or an SVGAnimatedLength.
- <transform-list> : The detailed description of the possible values for a <transform-list> are detailed in Modifying the User Coordinate System: the transform attribute.
  Within the SVG DOM, <transform-list> is represented as an SVGTransformList or an SVGAnimatedTransformList.
- <uri> (Uniform Resource Identifiers [URI] references): A URI is the address of a resource on the Web. For the specification of URI references in SVG, see URI references.
  Within the SVG DOM, <uri> is represented as a DOMString or an SVGAnimatedString.
- <frequency>: Frequency values are used with aural properties. The normative definition of frequency values can be found in [CSS2-AURAL]. A frequency value is a <number> immediately followed by a frequency unit identifier. Frequency unit identifiers are:
  - Hz: Hertz
  - kHz: kilo Hertz
  Frequency values may not be negative.
  The corresponding SVG DOM interface definitions for <frequency> are defined in [DOM2-CSS].
- <time>: A time value is a <number> immediately followed by a time unit identifier. Time unit identifiers are:
  - ms: milliseconds
  - s: seconds
  Time values are used in CSS properties and may not be negative.
  The corresponding SVG DOM interface definitions for <time> are defined in [DOM2-CSS].

## 4.2 Recognized color keyword names

The following is the list of recognized color keywords that can be used as a keyword value for data type <color>:

| aliceblue | rgb(240, 248, 255)
| antiquewhite | rgb(250, 235, 215)
| aqua | rgb( 0, 255, 255)
| aquamarine | rgb(127, 255, 212)
| azure | rgb(240, 255, 255)
| beige | rgb(245, 245, 220)
| bisque | rgb(255, 228, 196)
| black | rgb( 0, 0, 0)
| blanchedalmond | rgb(255, 235, 205)
| blue | rgb( 0, 0, 255)
| blueviolet | rgb(138, 43, 226)
| brown | rgb(165, 42, 42)
| burlywood | rgb(222, 184, 135)
| cadetblue | rgb( 95, 158, 160)
| chartreuse | rgb(127, 255, 0)
| chocolate | rgb(210, 105, 30)
| coral | rgb(255, 127, 80)
| cornflowerblue | rgb(100, 149, 237)
| cornsilk | rgb(255, 248, 220)
| crimson | rgb(220, 20, 60)
| cyan | rgb( 0, 255, 255)
| darkblue | rgb( 0, 0, 139)
| darkcyan | rgb( 0, 139, 139)
| darkgoldenrod | rgb(184, 134, 11)
| darkgray | rgb(169, 169, 169)
| darkgreen | rgb( 0, 100, 0)
| darkgrey | rgb(169, 169, 169)
| darkkhaki | rgb(189, 183, 107)
| darkmagenta | rgb(139, 0, 139)
| darkolivegreen | rgb( 85, 107, 47)
| darkorange | rgb(255, 140, 0)
| darkorchid | rgb(153, 50, 204)
| darkred | rgb(139, 0, 0)
| darksalmon | rgb(233, 150, 122)
| darkseagreen | rgb(143, 188, 143)
| darkslateblue | rgb( 72, 61, 139)
| darkslategray | rgb( 47, 79, 79)
| darkslategrey | rgb( 47, 79, 79)
| darkturquoise | rgb( 0, 206, 209)
| darkviolet | rgb(148, 0, 211)
| deeppink | rgb(255, 20, 147)
| deepskyblue | rgb( 0, 191, 255)
| dimgray | rgb(105, 105, 105)
| dimgrey | rgb(105, 105, 105)
| dodgerblue | rgb( 30, 144, 255)
| firebrick | rgb(178, 34, 34)
| floralwhite | rgb(255, 250, 240)
| forestgreen | rgb( 34, 139, 34)
| fuchsia | rgb(255, 0, 255)
| gainsboro | rgb(220, 220, 220)
| ghostwhite | rgb(248, 248, 255)
| gold | rgb(255, 215, 0)
| goldenrod | rgb(218, 165, 32)
| gray | rgb(128, 128, 128)
| grey | rgb(128, 128, 128)
| green | rgb( 0, 128, 0)
| greenyellow | rgb(173, 255, 47)
| honeydew | rgb(240, 255, 240)
| hotpink | rgb(255, 105, 180)
| indianred | rgb(205, 92, 92)
| indigo | rgb( 75, 0, 130)
| ivory | rgb(255, 255, 240)
| khaki | rgb(240, 230, 140)
| lavender | rgb(230, 230, 250)
| lavenderblush | rgb(255, 240, 245)
| lawngreen | rgb(124, 252, 0)
| lemonchiffon | rgb(255, 250, 205)
| lightblue | rgb(173, 216, 230)
| lightcoral | rgb(240, 128, 128)
| lightcyan | rgb(224, 255, 255)
| lightgoldenrodyellow | rgb(250, 250, 210)
| lightgray | rgb(211, 211, 211)
| lightgreen | rgb(144, 238, 144)
| lightgrey | rgb(211, 211, 211)
| lightpink | rgb(255, 182, 193)
| lightsalmon | rgb(255, 160, 122)
| lightseagreen | rgb( 32, 178, 170)
| lightskyblue | rgb(135, 206, 250)
| lightslategray | rgb(119, 136, 153)
| lightslategrey | rgb(119, 136, 153)
| lightsteelblue | rgb(176, 196, 222)
| lightyellow | rgb(255, 255, 224)
| lime | rgb( 0, 255, 0)
| limegreen | rgb( 50, 205, 50)
| linen | rgb(250, 240, 230)
| magenta | rgb(255, 0, 255)
| maroon | rgb(128, 0, 0)
| mediumaquamarine | rgb(102, 205, 170)
| mediumblue | rgb( 0, 0, 205)
| mediumorchid | rgb(186, 85, 211)
| mediumpurple | rgb(147, 112, 219)
| mediumseagreen | rgb( 60, 179, 113)
| mediumslateblue | rgb(123, 104, 238)
| mediumspringgreen | rgb( 0, 250, 154)
| mediumturquoise | rgb( 72, 209, 204)
| mediumvioletred | rgb(199, 21, 133)
| midnightblue | rgb( 25, 25, 112)
| mintcream | rgb(245, 255, 250)
| mistyrose | rgb(255, 228, 225)
| moccasin | rgb(255, 228, 181)
| navajowhite | rgb(255, 222, 173)
| navy | rgb( 0, 0, 128)
| oldlace | rgb(253, 245, 230)
| olive | rgb(128, 128, 0)
| olivedrab | rgb(107, 142, 35)
| orange | rgb(255, 165, 0)
| orangered | rgb(255, 69, 0)
| orchid | rgb(218, 112, 214)
| palegoldenrod | rgb(238, 232, 170)
| palegreen | rgb(152, 251, 152)
| paleturquoise | rgb(175, 238, 238)
| palevioletred | rgb(219, 112, 147)
| papayawhip | rgb(255, 239, 213)
| peachpuff | rgb(255, 218, 185)
| peru | rgb(205, 133, 63)
| pink | rgb(255, 192, 203)
| plum | rgb(221, 160, 221)
| powderblue | rgb(176, 224, 230)
| purple | rgb(128, 0, 128)
| red | rgb(255, 0, 0)
| rosybrown | rgb(188, 143, 143)
| royalblue | rgb( 65, 105, 225)
| saddlebrown | rgb(139, 69, 19)
| salmon | rgb(250, 128, 114)
| sandybrown | rgb(244, 164, 96)
| seagreen | rgb( 46, 139, 87)
| seashell | rgb(255, 245, 238)
| sienna | rgb(160, 82, 45)
| silver | rgb(192, 192, 192)
| skyblue | rgb(135, 206, 235)
| slateblue | rgb(106, 90, 205)
| slategray | rgb(112, 128, 144)
| slategrey | rgb(112, 128, 144)
| snow | rgb(255, 250, 250)
| springgreen | rgb( 0, 255, 127)
| steelblue | rgb( 70, 130, 180)
| tan | rgb(210, 180, 140)
| teal | rgb( 0, 128, 128)
| thistle | rgb(216, 191, 216)
| tomato | rgb(255, 99, 71)
| turquoise | rgb( 64, 224, 208)
| violet | rgb(238, 130, 238)
| wheat | rgb(245, 222, 179)
| white | rgb(255, 255, 255)
| whitesmoke | rgb(245, 245, 245)
| yellow | rgb(255, 255, 0)
| yellowgreen | rgb(154, 205, 50)

## 4.3 Basic DOM interfaces

The following interfaces are defined below: SVGElement, SVGAnimatedBoolean, SVGAnimatedString, SVGStringList, SVGAnimatedEnumeration, SVGAnimatedInteger, SVGNumber, SVGAnimatedNumber, SVGNumberList, SVGAnimatedNumberList, SVGLength, SVGAnimatedLength, SVGLengthList, SVGAnimatedLengthList, SVGAngle, SVGAnimatedAngle, SVGColor, SVGICCColor, SVGRect, SVGAnimatedRect, SVGUnitTypes, SVGStylable, SVGLocatable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan, SVGViewSpec, SVGURIReference, SVGCSSRule, SVGRenderingIntent.

### Interface SVGElement

All of the SVG DOM interfaces that correspond directly to elements in the SVG language (e.g., the SVGPathElement interface corresponds directly to the 'path' element in the language) are derivative from base class SVGElement.

IDL Definition

      interface SVGElement : Element {
                 attribute DOMString id;
                             // raises DOMException on setting
                 attribute DOMString xmlbase;
                             // raises DOMException on setting
        readonly attribute SVGSVGElement ownerSVGElement;
        readonly attribute SVGElement viewportElement;
      };

Attributes
  DOMString id
    The value of the id attribute on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  DOMString xmlbase
    Corresponds to attribute xml:base on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly SVGSVGElement ownerSVGElement
    The nearest ancestor 'svg' element. Null if the given element is the outermost 'svg' element.
  readonly SVGElement viewportElement
    The element which established the current viewport. Often, the nearest ancestor 'svg' element. Null if the given element is the outermost 'svg' element.

### Interface SVGAnimatedBoolean

Used for attributes of type boolean which can be animated.

IDL Definition

      interface SVGAnimatedBoolean {

                 attribute boolean baseVal;
                             // raises DOMException on setting
        readonly attribute boolean animVal;
      };

Attributes
  boolean baseVal
    The base value of the given attribute before applying any animations.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly boolean animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGAnimatedString

Used for attributes of type DOMString which can be animated.

IDL Definition

      interface SVGAnimatedString {

                 attribute DOMString baseVal;
                             // raises DOMException on setting
        readonly attribute DOMString animVal;
      };

Attributes
  DOMString baseVal
    The base value of the given attribute before applying any animations.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly DOMString animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGStringList

This interface defines a list of DOMString objects.

SVGStringList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

IDL Definition

      interface SVGStringList {

        readonly attribute unsigned long numberOfItems;

        void   clear (  )
                        raises( DOMException );
        DOMString initialize ( in DOMString newItem )
                        raises( DOMException, SVGException );
        DOMString getItem ( in unsigned long index )
                        raises( DOMException );
        DOMString insertItemBefore ( in DOMString newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        DOMString replaceItem ( in DOMString newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        DOMString removeItem ( in unsigned long index )
                        raises( DOMException );
        DOMString appendItem ( in DOMString newItem )
                        raises( DOMException, SVGException );
      };

Attributes
  readonly unsigned long numberOfItems
    The number of items in the list.
Methods
  clear
    Clears all existing current items from the list, with the result being an empty list.
    No Parameters
    No Return Value
    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.

  initialize
    Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
    Parameters

      in DOMString newItem |  | The item which should become the only member of the list.

    Return value

      DOMString |  | The item being inserted into the list.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  getItem
    Returns the specified item from the list.
    Parameters

      in unsigned long index |  | The index of the item from the list which is to be returned. The first item is number 0.

    Return value

      DOMString |  | The selected item.

    Exceptions

      DOMException |  | INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  insertItemBefore
    Inserts a new item into the list at the specified position. The first item is number 0. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in DOMString newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

    Return value

      DOMString |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  replaceItem
    Replaces an existing item in the list with a new item. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in DOMString newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item which is to be replaced. The first item is number 0.

    Return value

      DOMString |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  removeItem
    Removes an existing item from the list.
    Parameters

      in unsigned long index |  | The index of the item which is to be removed. The first item is number 0.

    Return value

      DOMString |  | The removed item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  appendItem
    Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in DOMString newItem |  | The item which is to be inserted into the list. The first item is number 0.

    Return value

      DOMString |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

### Interface SVGAnimatedEnumeration

Used for attributes whose value must be a constant from a particular enumeration and which can be animated.

IDL Definition

      interface SVGAnimatedEnumeration {

                 attribute unsigned short baseVal;
                             // raises DOMException on setting
        readonly attribute unsigned short animVal;
      };

Attributes
  unsigned short baseVal
    The base value of the given attribute before applying any animations.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly unsigned short animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGAnimatedInteger

Used for attributes of basic type 'integer' which can be animated.

IDL Definition

      interface SVGAnimatedInteger {

                 attribute long baseVal;
                             // raises DOMException on setting
        readonly attribute long animVal;
      };

Attributes
  long baseVal
    The base value of the given attribute before applying any animations.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly long animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGNumber

Used for attributes of basic type 'number'.

IDL Definition

      interface SVGNumber {

                 attribute float value;
                             // raises DOMException on setting
      };

Attributes
  float value
    The value of the given attribute.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

### Interface SVGAnimatedNumber

Used for attributes of basic type 'number' which can be animated.

IDL Definition

      interface SVGAnimatedNumber {

                 attribute float baseVal;
                             // raises DOMException on setting
        readonly attribute float animVal;
      };

Attributes
  float baseVal
    The base value of the given attribute before applying any animations.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly float animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGNumberList

This interface defines a list of SVGNumber objects.

SVGNumberList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

IDL Definition

      interface SVGNumberList {

        readonly attribute unsigned long numberOfItems;

        void   clear (  )
                        raises( DOMException );
        SVGNumber initialize ( in SVGNumber newItem )
                        raises( DOMException, SVGException );
        SVGNumber getItem ( in unsigned long index )
                        raises( DOMException );
        SVGNumber insertItemBefore ( in SVGNumber newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        SVGNumber replaceItem ( in SVGNumber newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        SVGNumber removeItem ( in unsigned long index )
                        raises( DOMException );
        SVGNumber appendItem ( in SVGNumber newItem )
                        raises( DOMException, SVGException );
      };

Attributes
  readonly unsigned long numberOfItems
    The number of items in the list.
Methods
  clear
    Clears all existing current items from the list, with the result being an empty list.
    No Parameters
    No Return Value
    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.

  initialize
    Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
    Parameters

      in SVGNumber newItem |  | The item which should become the only member of the list.

    Return value

      SVGNumber |  | The item being inserted into the list.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  getItem
    Returns the specified item from the list.
    Parameters

      in unsigned long index |  | The index of the item from the list which is to be returned. The first item is number 0.

    Return value

      SVGNumber |  | The selected item.

    Exceptions

      DOMException |  | INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  insertItemBefore
    Inserts a new item into the list at the specified position. The first item is number 0. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGNumber newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

    Return value

      SVGNumber |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  replaceItem
    Replaces an existing item in the list with a new item. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGNumber newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item which is to be replaced. The first item is number 0.

    Return value

      SVGNumber |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  removeItem
    Removes an existing item from the list.
    Parameters

      in unsigned long index |  | The index of the item which is to be removed. The first item is number 0.

    Return value

      SVGNumber |  | The removed item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  appendItem
    Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGNumber newItem |  | The item which is to be inserted into the list. The first item is number 0.

    Return value

      SVGNumber |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

### Interface SVGAnimatedNumberList

Used for attributes which take a list of numbers and which can be animated.

IDL Definition

      interface SVGAnimatedNumberList {

        readonly attribute SVGNumberList baseVal;
        readonly attribute SVGNumberList animVal;
      };

Attributes
  readonly SVGNumberList baseVal
    The base value of the given attribute before applying any animations.
  readonly SVGNumberList animVal
    If the given attribute or property is being animated, then this attribute contains the current animated value of the attribute or property, and both the object itself and its contents are readonly. If the given attribute or property is not currently being animated, then this attribute contains the same value as 'baseVal'.

### Interface SVGLength

The SVGLength interface corresponds to the <length> basic data type.

IDL Definition

      interface SVGLength {

        // Length Unit Types
        const unsigned short SVG_LENGTHTYPE_UNKNOWN    = 0;
        const unsigned short SVG_LENGTHTYPE_NUMBER     = 1;
        const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
        const unsigned short SVG_LENGTHTYPE_EMS        = 3;
        const unsigned short SVG_LENGTHTYPE_EXS        = 4;
        const unsigned short SVG_LENGTHTYPE_PX         = 5;
        const unsigned short SVG_LENGTHTYPE_CM         = 6;
        const unsigned short SVG_LENGTHTYPE_MM         = 7;
        const unsigned short SVG_LENGTHTYPE_IN         = 8;
        const unsigned short SVG_LENGTHTYPE_PT         = 9;
        const unsigned short SVG_LENGTHTYPE_PC         = 10;

        readonly attribute unsigned short unitType;
                 attribute float          value;
                             // raises DOMException on setting
                 attribute float          valueInSpecifiedUnits;
                             // raises DOMException on setting
                 attribute DOMString      valueAsString;
                             // raises DOMException on setting

        void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
        void convertToSpecifiedUnits ( in unsigned short unitType );
      };

Definition group Length Unit Types
  Defined constants

    SVG_LENGTHTYPE_UNKNOWN |  | The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    SVG_LENGTHTYPE_NUMBER |  | No unit type was provided (i.e., a unitless value was specified), which indicates a value in user units.
    SVG_LENGTHTYPE_PERCENTAGE |  | A percentage value was specified.
    SVG_LENGTHTYPE_EMS |  | A value was specified using the "em" units defined in CSS2.
    SVG_LENGTHTYPE_EXS |  | A value was specified using the "ex" units defined in CSS2.
    SVG_LENGTHTYPE_PX |  | A value was specified using the "px" units defined in CSS2.
    SVG_LENGTHTYPE_CM |  | A value was specified using the "cm" units defined in CSS2.
    SVG_LENGTHTYPE_MM |  | A value was specified using the "mm" units defined in CSS2.
    SVG_LENGTHTYPE_IN |  | A value was specified using the "in" units defined in CSS2.
    SVG_LENGTHTYPE_PT |  | A value was specified using the "pt" units defined in CSS2.
    SVG_LENGTHTYPE_PC |  | A value was specified using the "pc" units defined in CSS2.

Attributes
  readonly unsigned short unitType
    The type of the value as specified by one of the constants specified above.
  float value
    The value as an floating point value, in user units. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  float valueInSpecifiedUnits
    The value as an floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  DOMString valueAsString
    The value as a string value, in the units expressed by unitType. Setting this attribute will cause value and valueInSpecifiedUnits to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

Methods
  newValueSpecifiedUnits
    Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
    Parameters

      in unsigned short unitType |  | The unitType for the value (e.g., SVG_LENGTHTYPE_MM).
      in float valueInSpecifiedUnits |  | The new value.

    No Return Value
    No Exceptions
  convertToSpecifiedUnits
    Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueAsSpecified and valueAsString might be modified as a result of this method. For example, if the original value were "0.5cm" and the method was invoked to convert to millimeters, then the unitType would be changed to SVG_LENGTHTYPE_MM, valueAsSpecified would be changed to the numeric value 5 and valueAsString would be changed to "5mm".
    Parameters

      in unsigned short unitType |  | The unitType to switch to (e.g., SVG_LENGTHTYPE_MM).

    No Return Value
    No Exceptions

### Interface SVGAnimatedLength

Used for attributes of basic type 'length' which can be animated.

IDL Definition

      interface SVGAnimatedLength {

        readonly attribute SVGLength baseVal;
        readonly attribute SVGLength animVal;
      };

Attributes
  readonly SVGLength baseVal
    The base value of the given attribute before applying any animations.
  readonly SVGLength animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are readonly. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGLengthList

This interface defines a list of SVGLength objects.

SVGLengthList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

IDL Definition

      interface SVGLengthList {

        readonly attribute unsigned long numberOfItems;

        void   clear (  )
                        raises( DOMException );
        SVGLength initialize ( in SVGLength newItem )
                        raises( DOMException, SVGException );
        SVGLength getItem ( in unsigned long index )
                        raises( DOMException );
        SVGLength insertItemBefore ( in SVGLength newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        SVGLength replaceItem ( in SVGLength newItem, in unsigned long index )
                        raises( DOMException, SVGException );
        SVGLength removeItem ( in unsigned long index )
                        raises( DOMException );
        SVGLength appendItem ( in SVGLength newItem )
                        raises( DOMException, SVGException );
      };

Attributes
  readonly unsigned long numberOfItems
    The number of items in the list.
Methods
  clear
    Clears all existing current items from the list, with the result being an empty list.
    No Parameters
    No Return Value
    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.

  initialize
    Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
    Parameters

      in SVGLength newItem |  | The item which should become the only member of the list.

    Return value

      SVGLength |  | The item being inserted into the list.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  getItem
    Returns the specified item from the list.
    Parameters

      in unsigned long index |  | The index of the item from the list which is to be returned. The first item is number 0.

    Return value

      SVGLength |  | The selected item.

    Exceptions

      DOMException |  | INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  insertItemBefore
    Inserts a new item into the list at the specified position. The first item is number 0. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGLength newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

    Return value

      SVGLength |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  replaceItem
    Replaces an existing item in the list with a new item. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGLength newItem |  | The item which is to be inserted into the list.
      in unsigned long index |  | The index of the item which is to be replaced. The first item is number 0.

    Return value

      SVGLength |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

  removeItem
    Removes an existing item from the list.
    Parameters

      in unsigned long index |  | The index of the item which is to be removed. The first item is number 0.

    Return value

      SVGLength |  | The removed item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified. INDEX_SIZE_ERR: Raised if the index number is negative or greater than or equal to numberOfItems.

  appendItem
    Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
    Parameters

      in SVGLength newItem |  | The item which is to be inserted into the list. The first item is number 0.

    Return value

      SVGLength |  | The inserted item.

    Exceptions

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised when the list cannot be modified.
      SVGException |  | SVG_WRONG_TYPE_ERR: Raised if parameter newItem is the wrong type of object for the given list.

### Interface SVGAnimatedLengthList

Used for attributes of type SVGLengthList which can be animated.

IDL Definition

      interface SVGAnimatedLengthList {

        readonly attribute SVGLengthList baseVal;
        readonly attribute SVGLengthList animVal;
      };

Attributes
  readonly SVGLengthList baseVal
    The base value of the given attribute before applying any animations.
  readonly SVGLengthList animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are readonly. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGAngle

The SVGAngle interface corresponds to the <angle> basic data type.

IDL Definition

      interface SVGAngle {

        // Angle Unit Types
        const unsigned short SVG_ANGLETYPE_UNKNOWN     = 0;
        const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
        const unsigned short SVG_ANGLETYPE_DEG         = 2;
        const unsigned short SVG_ANGLETYPE_RAD         = 3;
        const unsigned short SVG_ANGLETYPE_GRAD        = 4;

        readonly attribute unsigned short unitType;
                 attribute float          value;
                             // raises DOMException on setting
                 attribute float          valueInSpecifiedUnits;
                             // raises DOMException on setting
                 attribute DOMString      valueAsString;
                             // raises DOMException on setting

        void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
        void convertToSpecifiedUnits ( in unsigned short unitType );
      };

Definition group Angle Unit Types
  Defined constants

    SVG_ANGLETYPE_UNKNOWN |  | The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    SVG_ANGLETYPE_UNSPECIFIED |  | No unit type was provided (i.e., a unitless value was specified). For angles, a unitless value is treated the same as if degrees were specified.
    SVG_ANGLETYPE_DEG |  | The unit type was explicitly set to degrees.
    SVG_ANGLETYPE_RAD |  | The unit type is radians.
    SVG_ANGLETYPE_GRAD |  | The unit type is grads.

Attributes
  readonly unsigned short unitType
    The type of the value as specified by one of the constants specified above.
  float value
    The angle value as a floating point value, in degrees. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  float valueInSpecifiedUnits
    The angle value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  DOMString valueAsString
    The angle value as a string value, in the units expressed by unitType. Setting this attribute will cause value and valueInSpecifiedUnits to be updated automatically to reflect this setting.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

Methods
  newValueSpecifiedUnits
    Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
    Parameters

      in unsigned short unitType |  | The unitType for the angle value (e.g., SVG_ANGLETYPE_DEG).
      in float valueInSpecifiedUnits |  | The angle value.

    No Return Value
    No Exceptions
  convertToSpecifiedUnits
    Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueAsSpecified and valueAsString might be modified as a result of this method.
    Parameters

      in unsigned short unitType |  | The unitType to switch to (e.g., SVG_ANGLETYPE_DEG).

    No Return Value
    No Exceptions

### Interface SVGAnimatedAngle

Corresponds to all properties and attributes whose values can be basic type 'angle' and which are animatable.

IDL Definition

      interface SVGAnimatedAngle {

        readonly attribute SVGAngle baseVal;
        readonly attribute SVGAngle animVal;
      };

Attributes
  readonly SVGAngle baseVal
    The base value of the given attribute before applying any animations.
  readonly SVGAngle animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are readonly. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGColor

The SVGColor interface corresponds to color value definition for properties 'stop-color', 'flood-color' and 'lighting-color' and is a base class for interface SVGPaint. It incorporates SVG's extended notion of color, which incorporates ICC-based color specifications.

Interface SVGColor does not correspond to the <color> basic data type. For the <color> basic data type, the applicable DOM interfaces are defined in [DOM2-CSS]; in particular, see the [DOM2-CSS-RGBCOLOR].

IDL Definition

      interface SVGColor : css::CSSValue {
        // Color Types
        const unsigned short SVG_COLORTYPE_UNKNOWN           = 0;
        const unsigned short SVG_COLORTYPE_RGBCOLOR          = 1;
        const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
        const unsigned short SVG_COLORTYPE_CURRENTCOLOR      = 3;

        readonly attribute unsigned short colorType;
        readonly attribute css::RGBColor  rgbColor;
        readonly attribute SVGICCColor    iccColor;

        void        setRGBColor ( in DOMString rgbColor )
                        raises( SVGException );
        void        setRGBColorICCColor ( in DOMString rgbColor, in DOMString iccColor )
                        raises( SVGException );
        void        setColor ( in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor )
                        raises( SVGException );
      };

Definition group Color Types
  Defined constants

    SVG_COLORTYPE_UNKNOWN |  | The color type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    SVG_COLORTYPE_RGBCOLOR |  | An sRGB color has been specified without an alternative ICC color specification.
    SVG_COLORTYPE_RGBCOLOR_ICCCOLOR |  | An sRGB color has been specified along with an alternative ICC color specification.
    SVG_COLORTYPE_CURRENTCOLOR |  | Corresponds to when keyword 'currentColor' has been specified.

Attributes
  readonly unsigned short colorType
    The type of the value as specified by one of the constants specified above.
  readonly css::RGBColor rgbColor
    The color specified in the sRGB color space.
  readonly SVGICCColor iccColor
    The alternate ICC color specification.
Methods
  setRGBColor
    Modifies the color value to be the specified sRGB color without an alternate ICC color specification.
    Parameters

      in DOMString rgbColor |  | The new color value.

    No Return Value
    Exceptions

      SVGException |  | SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.

  setRGBColorICCColor
    Modifies the color value to be the specified sRGB color with an alternate ICC color specification.
    Parameters

      in DOMString rgbColor |  | The new color value.
      in DOMString iccColor |  | The alternate ICC color specification.

    No Return Value
    Exceptions

      SVGException |  | SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.

  setColor
    Sets the colorType as specified by the parameters. If `colorType` requires an RGBColor, then `rgbColor` must be a valid RGBColor object; otherwise, `rgbColor` must be null. If `colorType` requires an SVGICCColor, then `iccColor` must be a valid SVGICCColor object; otherwise, `iccColor` must be null.
    Parameters

      in unsigned short colorType |  | One of the defined constants for colorType.
      in DOMString rgbColor |  | The specification of an sRGB color, or null.
      in DOMString iccColor |  | The specification of an ICC color, or null.

    No Return Value
    Exceptions

      SVGException |  | SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.

### Interface SVGICCColor

The SVGICCColor interface expresses an ICC-based color specification.

IDL Definition

      interface SVGICCColor {

                 attribute DOMString      colorProfile;
                             // raises DOMException on setting
        readonly attribute SVGNumberList colors;
      };

Attributes
  DOMString colorProfile

    The name of the color profile, which is the first parameter of an ICC color specification.

    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  readonly SVGNumberList colors

    The list of color values that define this ICC color. Each color value is an arbitrary floating point number.

### Interface SVGRect

Rectangles are defined as consisting of a (x,y) coordinate pair identifying a minimum X value, a minimum Y value, and a width and height, which are usually constrained to be non-negative.

IDL Definition

      interface SVGRect {

                 attribute float x;
                             // raises DOMException on setting
                 attribute float y;
                             // raises DOMException on setting
                 attribute float width;
                             // raises DOMException on setting
                 attribute float height;
                             // raises DOMException on setting
      };

Attributes
  float x
    Corresponds to attribute x on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  float y
    Corresponds to attribute y on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  float width
    Corresponds to attribute width on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  float height
    Corresponds to attribute height on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

### Interface SVGAnimatedRect

Used for attributes of type SVGRect which can be animated.

IDL Definition

      interface SVGAnimatedRect {

        readonly attribute SVGRect baseVal;
        readonly attribute SVGRect animVal;
      };

Attributes
  readonly SVGRect baseVal
    The base value of the given attribute before applying any animations.
  readonly SVGRect animVal
    If the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are readonly. If the given attribute or property is not currently being animated, contains the same value as 'baseVal'.

### Interface SVGUnitTypes

The SVGUnitTypes interface defines a commonly used set of constants and is a base interface used by SVGGradientElement, SVGPatternElement, SVGClipPathElement, SVGMaskElement, and SVGFilterElement.

IDL Definition

      interface SVGUnitTypes {

        // Unit Types
        const unsigned short SVG_UNIT_TYPE_UNKNOWN           = 0;
        const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE    = 1;
        const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
      };

Definition group Unit Types
  Defined constants

    SVG_UNIT_TYPE_UNKNOWN |  | The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    SVG_UNIT_TYPE_USERSPACEONUSE |  | Corresponds to value userSpaceOnUse.
    SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |  | Corresponds to value objectBoundingBox.

### Interface SVGStylable

IDL Definition

      interface SVGStylable {

        readonly attribute SVGAnimatedString className;
        readonly attribute css::CSSStyleDeclaration style;

        css::CSSValue getPresentationAttribute ( in DOMString name );
      };

Attributes
  readonly SVGAnimatedString className
    Corresponds to attribute class on the given element.
  readonly css::CSSStyleDeclaration style
    Corresponds to attribute style on the given element. If the user agent does not support styling with CSS, then this attribute must always have the value of null.
Methods
  getPresentationAttribute
    Returns the base (i.e., static) value of a given presentation attribute as an object of type CSSValue. The returned object is live; changes to the objects represent immediate changes to the objects to which the CSSValue is attached.
    Parameters

      in DOMString name |  | Retrieves a "presentation attribute" by name.

    Return value

      css::CSSValue |  | The static/base value of the given presentation attribute as a CSSValue, or NULL if the given attribute does not have a specified value.

    No Exceptions

### Interface SVGLocatable

Interface SVGLocatable is for all elements which either have a transform attribute or don't have a transform attribute but whose content can have a bounding box in current user space.

IDL Definition

      interface SVGLocatable {

        readonly attribute SVGElement              nearestViewportElement;
        readonly attribute SVGElement              farthestViewportElement;

        SVGRect   getBBox (  );
        SVGMatrix getCTM (  );
        SVGMatrix getScreenCTM (  );
        SVGMatrix getTransformToElement ( in SVGElement element )
                        raises( SVGException );
      };

Attributes
  readonly SVGElement nearestViewportElement
    The element which established the current viewport. Often, the nearest ancestor 'svg' element. Null if the current element is the outermost 'svg' element.
  readonly SVGElement farthestViewportElement
    The farthest ancestor 'svg' element. Null if the current element is the outermost 'svg' element.
Methods
  getBBox
    Returns the tight bounding box in current user space (i.e., after application of the transform attribute, if any) on the geometry of all contained graphics elements, exclusive of stroke-width and filter effects).
    No Parameters
    Return value

      SVGRect |  | An SVGRect object that defines the bounding box.

    No Exceptions
  getCTM
    Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the viewport coordinate system for the nearestViewportElement.
    No Parameters
    Return value

      SVGMatrix |  | An SVGMatrix object that defines the CTM.

    No Exceptions
  getScreenCTM
    Returns the transformation matrix from current user units (i.e., after application of the transform attribute, if any) to the parent user agent's notice of a "pixel". For display devices, ideally this represents a physical screen pixel. For other devices or environments where physical pixel sizes are not known, then an algorithm similar to the CSS2 definition of a "pixel" can be used instead.
    No Parameters
    Return value

      SVGMatrix |  | An SVGMatrix object that defines the given transformation matrix.

    No Exceptions
  getTransformToElement
    Returns the transformation matrix from the user coordinate system on the current element (after application of the transform attribute, if any) to the user coordinate system on parameter `element` (after application of its transform attribute, if any).
    Parameters

      in SVGElement element |  | The target element.

    Return value

      SVGMatrix |  | An SVGMatrix object that defines the transformation.

    Exceptions

      SVGException |  | SVG_MATRIX_NOT_INVERTABLE: Raised if the currently defined transformation matrices make it impossible to compute the given matrix (e.g., because one of the transformations is singular).

### Interface SVGTransformable

Interface SVGTransformable contains properties and methods that apply to all elements which have attribute transform.

IDL Definition

      interface SVGTransformable : SVGLocatable {
        readonly attribute SVGAnimatedTransformList transform;
      };

Attributes
  readonly SVGAnimatedTransformList transform
    Corresponds to attribute transform on the given element.

### Interface SVGTests

Interface SVGTests defines an interface which applies to all elements which have attributes requiredFeatures, requiredExtensions and systemLanguage.

IDL Definition

      interface SVGTests {

        readonly attribute SVGStringList requiredFeatures;
        readonly attribute SVGStringList requiredExtensions;
        readonly attribute SVGStringList systemLanguage;

        boolean hasExtension ( in DOMString extension );
      };

Attributes
  readonly SVGStringList requiredFeatures
    Corresponds to attribute requiredFeatures on the given element.
  readonly SVGStringList requiredExtensions
    Corresponds to attribute requiredExtensions on the given element.
  readonly SVGStringList systemLanguage
    Corresponds to attribute systemLanguage on the given element.
Methods
  hasExtension
    Returns true if the user agent supports the given extension, specified by a URI.
    Parameters

      in DOMString extension |  | The name of the extension, expressed as a URI.

    Return value

      boolean |  | True or false, depending on whether the given extension is supported.

    No Exceptions

### Interface SVGLangSpace

Interface SVGLangSpace defines an interface which applies to all elements which have attributes xml:lang and xml:space.

IDL Definition

      interface SVGLangSpace {

                 attribute DOMString xmllang;
                             // raises DOMException on setting
                 attribute DOMString xmlspace;
                             // raises DOMException on setting
      };

Attributes
  DOMString xmllang
    Corresponds to attribute xml:lang on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

  DOMString xmlspace
    Corresponds to attribute xml:space on the given element.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

### Interface SVGExternalResourcesRequired

Interface SVGExternalResourcesRequired defines an interface which applies to all elements where this element or one of its descendants can reference an external resource.

IDL Definition

      interface SVGExternalResourcesRequired {

        readonly attribute SVGAnimatedBoolean externalResourcesRequired;
      };

Attributes
  readonly SVGAnimatedBoolean externalResourcesRequired
    Corresponds to attribute externalResourcesRequired on the given element.

### Interface SVGFitToViewBox

Interface SVGFitToViewBox defines DOM attributes that apply to elements which have XML attributes viewBox and preserveAspectRatio.

IDL Definition

      interface SVGFitToViewBox {

        readonly attribute SVGAnimatedRect                viewBox;
        readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
      };

Attributes
  readonly SVGAnimatedRect viewBox
    Corresponds to attribute viewBox on the given element.
  readonly SVGAnimatedPreserveAspectRatio preserveAspectRatio
    Corresponds to attribute preserveAspectRatio on the given element.

### Interface SVGZoomAndPan

The SVGZoomAndPan interface defines attribute "zoomAndPan" and associated constants.

IDL Definition

      interface SVGZoomAndPan {

        // Zoom and Pan Types
        const unsigned short SVG_ZOOMANDPAN_UNKNOWN   = 0;
        const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
        const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;

                 attribute unsigned short zoomAndPan;
                             // raises DOMException on setting
      };

Definition group Zoom and Pan Types
  Defined constants

    SVG_ZOOMANDPAN_UNKNOWN |  | The enumeration was set to a value that is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    SVG_ZOOMANDPAN_DISABLE |  | Corresponds to value disable.
    SVG_ZOOMANDPAN_MAGNIFY |  | Corresponds to value magnify.

Attributes
  unsigned short zoomAndPan
    Corresponds to attribute zoomAndPan on the given element. The value must be one of the zoom and pan constants specified above.
    Exceptions on setting

      DOMException |  | NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a readonly attribute.

### Interface SVGViewSpec

The interface corresponds to an SVG View Specification.

IDL Definition

      interface SVGViewSpec :
                      SVGZoomAndPan,
                      SVGFitToViewBox {

        readonly attribute SVGTransformList transform;
        readonly attribute SVGElement       viewTarget;
        readonly attribute DOMString        viewBoxString;
        readonly attribute DOMString        preserveAspectRatioString;
        readonly attribute DOMString        transformString;
        readonly attribute DOMString        viewTargetString;
      };

Attributes
  readonly SVGTransformList transform
    Corresponds to the transform setting on the SVG View Specification.
  readonly SVGElement viewTarget
    Corresponds to the viewTarget setting on the SVG View Specification.
  readonly DOMString viewBoxString
    Corresponds to the viewBox setting on the SVG View Specification.
  readonly DOMString preserveAspectRatioString
    Corresponds to the preserveAspectRatio setting on the SVG View Specification.
  readonly DOMString transformString
    Corresponds to the transform setting on the SVG View Specification.
  readonly DOMString viewTargetString
    Corresponds to the viewTarget setting on the SVG View Specification.

### Interface SVGURIReference

Interface SVGURIReference defines an interface which applies to all elements which have the collection of XLink attributes, such as xlink:href, which define a URI reference.

IDL Definition

      interface SVGURIReference {

        readonly attribute SVGAnimatedString href;
      };

Attributes
  readonly SVGAnimatedString href
    Corresponds to attribute xlink:href on the given element.

### Interface SVGCSSRule

SVG extends interface CSSRule with interface SVGCSSRule by adding an SVGColorProfileRule rule to allow for specification of ICC-based color.

It is likely that this extension will become part of a future version of CSS and DOM.

IDL Definition

      interface SVGCSSRule : css::CSSRule {
        // Additional CSS RuleType to support ICC color specifications
        const unsigned short COLOR_PROFILE_RULE = 7;
      };

Definition group Additional CSS RuleType to support ICC color specifications
  Defined constants

    COLOR_PROFILE_RULE |  | The rule is an @color-profile.

### Interface SVGRenderingIntent

The SVGRenderingIntent interface defines the enumerated list of possible values for 'rendering-intent' attributes or descriptors.

IDL Definition

      interface SVGRenderingIntent {

        // Rendering Intent Types
        const unsigned short RENDERING_INTENT_UNKNOWN               = 0;
        const unsigned short RENDERING_INTENT_AUTO                  = 1;
        const unsigned short RENDERING_INTENT_PERCEPTUAL            = 2;
        const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
        const unsigned short RENDERING_INTENT_SATURATION            = 4;
        const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
      };

Definition group Rendering Intent Types
  Defined constants

    RENDERING_INTENT_UNKNOWN |  | The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
    RENDERING_INTENT_AUTO |  | Corresponds to a value of auto.
    RENDERING_INTENT_PERCEPTUAL |  | Corresponds to a value of perceptual.
    RENDERING_INTENT_RELATIVE_COLORIMETRIC |  | Corresponds to a value of relative-colorimetric.
    RENDERING_INTENT_SATURATION |  | Corresponds to a value of saturation.
    RENDERING_INTENT_ABSOLUTE_COLORIMETRIC |  | Corresponds to a value of absolute-colorimetric.

previous next contents elements attributes properties index