firstDaisy Diff compare report.
Click on the changed parts for a detailed description. Use the left and right arrow keys to walk through the modifications.
last 

7.10 Units

All coordinates and lengths in SVG can be specified with or without a unit identifier.

When a coordinate or length value is a number without a unit identifier (e.g., "25"), then the given coordinate or length is assumed to be in user units (i.e., a value in the current user coordinate system). For example:

<text style="font-size: 50">Text size is 50 user units</text>

Alternatively, a coordinate or length value can be expressed as a number following by a unit identifier (e.g., "25cm" or "15em"). The list of unit identifiers in SVG matches the list of unit identifiers in CSS: em, ex, px, pt, pc, cm, mm, in and percentages. The following describes how the various unit identifiers are processed:

Note that use of px units or any other absolute unit identifiers can cause inconsistent visual results on different viewing environments since the size of "1px" may map to a different number of user units on different systems; thus, absolute units identifiers are only recommended for the 'width' and the 'height' on outermost 'svg' elements and situations where the content contains no transformations and it is desirable to specify values relative to the device pixel grid or to a particular real world unit size.

For percentage values that are defined to be relative to the size of viewport:

Example Units below illustrates some of the processing rules for different types of units.

<?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="200px" viewBox="0 0 4000 2000"
     xmlns="http://www.w3.org/2000/svg" version="1.1">
  <title>Example Units</title>
  <desc>Illustrates various units options</desc>

  <!-- Frame the picture -->
  <rect x="5" y="5" width="3990" height="1990" 
        fill="none" stroke="blue" stroke-width="10"/>

  <g fill="blue" stroke="red" font-family="Verdana" font-size="150">
    <!-- Absolute unit specifiers -->
    <g transform="translate(400,0)">
      <text x="-50" y="300" fill="black" stroke="none">Abs. units:</text>
      <rect x="0" y="400" width="4in" height="2in" stroke-width=".4in"/>
      <rect x="0" y="750" width="384" height="192" stroke-width="38.4"/>
      <g transform="scale(2)">
        <rect x="0" y="600" width="4in" height="2in" stroke-width=".4in"/>
      </g>
    </g>

    <!-- Relative unit specifiers -->
    <g transform="translate(1600,0)">
      <text x="-50" y="300" fill="black" stroke="none">Rel. units:</text>
      <rect x="0" y="400" width="2.5em" height="1.25em" stroke-width=".25em"/>
      <rect x="0" y="750" width="375" height="187.5" stroke-width="37.5"/>
      <g transform="scale(2)">
        <rect x="0" y="600" width="2.5em" height="1.25em" stroke-width=".25em"/>
      </g>
    </g>

    <!-- Percentages -->
    <g transform="translate(2800,0)">
      <text x="-50" y="300" fill="black" stroke="none">Percentages:</text>
      <rect x="0" y="400" width="10%" height="10%" stroke-width="1%"/>
      <rect x="0" y="750" width="400" height="200" stroke-width="31.62"/>
      <g transform="scale(2)">
        <rect x="0" y="600" width="10%" height="10%" stroke-width="1%"/>
      </g>
    </g>
  </g>
</svg>
Example Units
Example Units — demonstrate available options

View this example as SVG (SVG-enabled browsers only)  

The three rectangles on the left demonstrate the use of one of the absolute unit identifiers, the "in" unit (inch). The reference image above was generated on a 96dpi system (i.e., 1 inch = 96 pixels). Therefore, the topmost rectangle, which is specified in inches, is exactly the same size as the middle rectangle, which is specified in user units such that there are 96 user units for each corresponding inch in the topmost rectangle. (Note: on systems with different screen resolutions, the top and middle rectangles will likely be rendered at different sizes.) The bottom rectangle of the group illustrates what happens when values specified in inches are scaled.

The three rectangles in the middle demonstrate the use of one of the relative unit identifiers, the "em" unit. Because the 'font-size' property has been set to 150 on the outermost 'g' element, each "em" unit is equal to 150 user units. The topmost rectangle, which is specified in "em" units, is exactly the same size as the middle rectangle, which is specified in user units such that there are 150 user units for each corresponding "em" unit in the topmost rectangle. The bottom rectangle of the group illustrates what happens when values specified in "em" units are scaled.

The three rectangles on the right demonstrate the use of percentages. Note that the width and height of the viewport in the user coordinate system for the viewport element (in this case, the outermost 'svg' element) are 4000 and 2000, respectively, because processing the 'viewBox' attribute results in a transformed user coordinate system. The topmost rectangle, which is specified in percentage units, is exactly the same size as the middle rectangle, which is specified in equivalent user units. In particular, note that the 'stroke-width' property in the middle rectangle is set to 1% of the sqrt((actual-width)**2 + (actual-height)**2)) / sqrt(2), which in this case is .01*sqrt(4000*4000+2000*2000)/sqrt(2), or 31.62. The bottom rectangle of the group illustrates what happens when values specified in percentage units are scaled.

7.11 Object bounding box units

The following elements offer the option of expressing coordinate values and lengths as fractions (and, in some cases, percentages) of the bounding box (via keyword objectBoundingBox) on a , by setting a specified attribute to 'objectBoundingBox' on the given element:

ElementAttributeEffect
'linearGradient''gradientUnits
="objectBoundingBox"
'Indicates that the attributes which specify the gradient vector ('x1', 'y1', 'x2', 'y2') represent fractions or percentages of the bounding box of the element to which the gradient is applied.
'radialGradient''gradientUnits
="objectBoundingBox"
'Indicates that the attributes which specify the center ('cx', 'cy'), the radius ('r') and focus ('fx', 'fy') represent fractions or percentages of the bounding box of the element to which the gradient is applied.
'pattern''patternUnits
="objectBoundingBox"
'Indicates that the attributes which define how to tile the pattern ('x', 'y', 'width', 'height') are established using the bounding box of the element to which the pattern is applied.
'pattern''patternContentUnits
="objectBoundingBox"
'Indicates that the user coordinate system for the contents of the pattern is established using the bounding box of the element to which the pattern is applied.
'clipPath''clipPathUnits
="objectBoundingBox"
'Indicates that the user coordinate system for the contents of the 'clipPath' element is established using the bounding box of the element to which the clipping path is applied.
'mask''maskUnits
="objectBoundingBox"
'Indicates that the attributes which define the masking region ('x', 'y', 'width', 'height') is established using the bounding box of the element to which the mask is applied.
'mask''maskContentUnits
="objectBoundingBox"
'Indicates that the user coordinate system for the contents of the 'mask' element are established using the bounding box of the element to which the mask is applied.
'filter''filterUnits
="objectBoundingBox"
'Indicates that the attributes which define the filter effects region ('x', 'y', 'width', 'height') represent fractions or percentages of the bounding box of the element to which the filter is applied.
'filter''primitiveUnits
="objectBoundingBox"
'Indicates that the various length values within the filter primitives represent fractions or percentages of the bounding box of the element to which the filter is applied.

In the discussion that follows, the term applicable element is the element to which the given effect applies. For gradients and patterns, the applicable element is the graphics element which has its 'fill' or 'stroke' property referencing the given gradient or pattern. (See Inheritance of Painting Properties. For special rules concerning text elements, see the discussion of object bounding box units and text elements.) For clipping paths, masks and filters, the applicable element can be either a container element or a graphics element.

When keyword objectBoundingBox is used, then the effect is as if a supplemental transformation matrix were inserted into the list of nested transformation matrices to create a new user coordinate system.

First, the (minx,miny) and (maxx,maxy) coordinates are determined for the applicable element and all of its descendants. The values minx, miny, maxx and maxy are determined by computing the maximum extent of the shape of the element in X and Y with respect to the user coordinate system for the applicable element. The bounding box is the tightest fitting rectangle aligned with the axes of the applicable element's user coordinate system that entirely encloses the applicable element and its descendants. The bounding box is computed exclusive of any values for clipping, masking, filter effects, opacity and stroke-width. For curved shapes, the bounding box encloses all portions of the shape, not just end points. For 'text' elements, for the purposes of the bounding box calculation, each glyph is treated as a separate graphics element. The calculations assume that all glyphs occupy the full glyph cell. For example, for horizontal text, the calculations assume that each glyph extends vertically to the full ascent and descent values for the font.

Then, coordinate (0,0) in the new user coordinate system is mapped to the (minx,miny) corner of the tight bounding box within the user coordinate system of the applicable element and coordinate (1,1) in the new user coordinate system is mapped to the (maxx,maxy) corner of the tight bounding box of the applicable element. In most situations, the following transformation matrix produces the correct effect:

[ (maxx-minx) 0 0 (maxy-miny) minx miny ]

 

When percentages are used with attributes that define the gradient vector, the pattern tile, the filter region or the masking region, a percentage represents the same value as the corresponding decimal value (e.g., 50% means the same as 0.5). If percentages are used within the content of a 'pattern', 'clipPath', 'mask' or 'filter' element, these values are treated according to the processing rules for percentages as defined in Units.

Any numeric value can be specified for values expressed as a fraction or percentage of object bounding box units. In particular, fractions less are zero or greater than one and percentages less than 0% or greater than 100% can be specified.

Keyword objectBoundingBox should not be used when the geometry of the applicable element has no width or no height, such as the case of a horizontal or vertical line, even when the line has actual thickness when viewed due to having a non-zero stroke width since stroke width is ignored for bounding box calculations. When the geometry of the applicable element has no width or height and objectBoundingBox is specified, then the given effect (e.g., a gradient or a filter) will be ignored.

7.12 Geographic

Coordinate Systems

coordinate systems

In order to allow interoperability between SVG content generators and user agents dealing with maps encoded in SVG, SVG encourages the use of a common metadata definition for describing the coordinate system used to generate SVG documents is encouraged.

Such metadata should must be added under the 'metadata' element of the topmost 'svg' element describing the map. They consist , consisting of an RDF description of the Coordinate Reference System definition used to generate the SVG map [RDF10]. The definition should Note that the presence of this metadata does not affect the rendering of the SVG in any way; it merely provides added semantic value for applications that make use of combined maps.

The definition must be conformant to the XML grammar described in the OpenGIS Recommendation on the Definition of Coordinate Reference System [OpenGIS Coordinate Systems GML 3.2.1, an OpenGIS Standard for encoding common CRS data types in XML [GML]. In order to correctly map the 2-dimensional data used by SVG, the CRS must be of subtype ProjectedCRS or Geographic2dCRS. The first axis of the described CRS maps the SVG x-axis and the second axis maps the SVG y-axis. Optionally, an additional affine transformation

The main purpose of such metadata is to indicate to the user agent that two or more SVG documents can be overlayed or merged into a single document. Obviously, if two maps reference the same Coordinate Reference System definition and have the same SVG 'transform' attribute value then they can be overlayed without reprojecting the data. If the maps reference different Coordinate Reference Systems and/or have different SVG 'transform' attribute values, then a specialized cartographic user agent may choose to transform the coordinate data to overlay the data. However, typical SVG user agents are not required to perform these types of transformations, or even recognize the metadata. It is described in this specification so that the connection between geographic coordinate systems and the SVG coordinate system is clear.

7.13 The 'svg:transform' attribute

Attribute definition:

svg:transform = "<transform>" | "none"
<transform>

Specifies the affine transformation that has been applied to the map data. The syntax is identical to that described in The 'transform' attribute section.

none

Specifies that no supplemental affine transformation has been applied to the map data. Using this value has the same meaning as specifying the identity matrix, which in turn is just the same as not specifying the 'svg:transform' the attribute at all.

Animatable: no.

This attribute describes an optional additional affine transformation that may have been applied during this mapping. This additional transformation is described by an SVG transform attribute that can attribute may be added to the OpenGIS 'CoordinateReferenceSystem' element. Note that, unlike the 'transform attribute on the 'CoordinateReferenceSystem' ' attribute, it does not indicate that a transformation should is to be applied to the data within the file. Instead, it simply describes the transformation that was already applied to the data when being encoded in SVG.

There are three typical uses for the SVG 'svg:transform' global attribute. These are described below and used in the examples.

The main purpose of such metadata is to indicate to the User Agent that two or more SVG documents can be overlayed or merged into a single document. Obviously, if two maps reference the same Coordinate Reference System definition and have the same SVG transform attribute value then they can be overlayed without reprojecting the data. If the maps reference different Coordinate Reference Systems and/or have different SVG transform attribute values, then a specialized cartographic User Agent may choose to transform the coordinate data to overlay the data. However, typical SVG user agents are not required to perform these types of transformations, or even recognize the metadata.

Below is a simple example of the coordinate metadata, which describes the coordinate system used by the document via a URI.

<?xml version="1.0"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg xmlns="http://www.w3.org/
Graphics/SVG/
2000/svg" version="1.1
/DTD/svg11.dtd
"
>


<svg
     width="100" height="100" viewBox="0 0 1000 1000">

version="1.1"

  <desc>An example 
xmlns="http://www.w3.org/2000/svg">
that references coordinate data.</desc>

  
<metadata>
    
<rdf:RDF xmlns:rdf
=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             
xmlns:crs
=
"http://www.ogc.org/crs"
             
xmlns:svg="http://wwww.w3.org/2000/svg">
      
<rdf:
Description>
Description rdf:about="">
        
<!-- The Coordinate Reference System is described
             
through 
an
a URI. -->
        
<crs:CoordinateReferenceSystem
            svg:transform="rotate(-90)"
            
rdf:resource="
"
http://www.example.org/srs/epsg.xml#4326"/>
      
</rdf:Description>
    
</rdf:RDF>
  
</metadata>

  
<!-- The actual map content -->
</svg>

The second example uses a well-known identifier to describe the coordinate system. Note that the coordinates used in the document have had the supplied transform applied.

<?xml version="1.0"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg xmlns="http://www.w3.org/
Graphics/SVG/
2000/svg" version="1.1
/DTD/svg11.dtd
"
>


<svg
     width="100" height="100" viewBox="0 0 1000 1000">

version="1.1"

  <desc>Example using 
xmlns="http://www.w3.org/2000/svg">
a well known coordinate system.</desc>

  
<metadata>
    
<rdf:RDF xmlns:rdf
=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             
xmlns:crs
=
"http://www.ogc.org/crs"
             
xmlns:svg="http://wwww.w3.org/2000/svg">
      
<rdf:
Description>
Description rdf:about="">
        
<!-- In case of a well-known Coordinate Reference System
             
an 'Identifier' is enough to describe the CRS -->
        
<crs:CoordinateReferenceSystem svg:transform="rotate(-90) scale(100, 100)">
          
<crs:Identifier>
            
<crs:code>4326</crs:code>
            
<crs:codeSpace>EPSG</crs:codeSpace>
            
<crs:edition>5.2</crs:edition>
          
</crs:Identifier>
        
</crs:CoordinateReferenceSystem>
      
</rdf:Description>
    
</rdf:RDF>
  
</metadata>

  
<!-- The actual map content -->
</svg>

The third example defines the coordinate system completely within the SVG document.

<?xml version="1.0"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg xmlns="http://www.w3.org/
Graphics/SVG/
2000/svg" version="1.1
/DTD/svg11.dtd
"
>


<svg
     width="100" height="100" viewBox="0 0 1000 1000">

version="1.1"

  <desc>Coordinate metadata 
xmlns="http://www.w3.org/2000/svg"> <metadata>
defined within the SVG document</desc>

  <metadata>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             
xmlns:crs="http://www.ogc.org/crs"
             
xmlns:svg="http://wwww.w3.org/2000/svg">
      
<rdf:
Description>
Description rdf:about="">
        
<!-- For other CRS it should be entirely defined -->
        
<crs:CoordinateReferenceSystem svg:transform="scale(1,-1)">
          
<crs:NameSet>
            
<crs:name>Mercator projection of WGS84</crs:name>
          
</crs:NameSet>
          
<crs:ProjectedCRS>
            
<!-- The actual definition of the CRS -->
            
<crs:CartesianCoordinateSystem>
              
<crs:dimension>2</crs:dimension>
              
<crs:CoordinateAxis>
                
<crs:axisDirection>north</crs:axisDirection>
                
<crs:AngularUnit>
                  
<crs:Identifier>
                    
<crs:code>9108</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                
</crs:AngularUnit>
              
</crs:CoordinateAxis>
              
<crs:CoordinateAxis>
                
<crs:axisDirection>east</crs:axisDirection>
                
<crs:AngularUnit>
                  
<crs:Identifier>
                    
<crs:code>9108</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                
</crs:AngularUnit>
              
</crs:CoordinateAxis>
            
</crs:CartesianCoordinateSystem>
            
<crs:CoordinateReferenceSystem>
              
<!-- the reference system of that projected system is
                         
WGS84 which is EPSG 4326 in EPSG codeSpace -->
              
<crs:NameSet>
                
<crs:name>WGS 84</crs:name>
              
</crs:NameSet>
              
<crs:Identifier>
                
<crs:code>4326</crs:code>
                
<crs:codeSpace>EPSG</crs:codeSpace>
                
<crs:edition>5.2</crs:edition>
              
</crs:Identifier>
            
</crs:CoordinateReferenceSystem>
            
<crs:CoordinateTransformationDefinition>
              
<crs:sourceDimensions>2</crs:sourceDimensions>
              
<crs:targetDimensions>2</crs:targetDimensions>
              
<crs:ParameterizedTransformation>
                
<crs:TransformationMethod>
                  
<!-- the projection is a Mercator projection which is
                        
EPSG 9805 in EPSG codeSpace -->
                  
<crs:NameSet>
                    
<crs:name>Mercator</crs:name>
                  
</crs:NameSet>
                  
<crs:Identifier>
                    
<crs:code>9805</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                  
<crs:description>Mercator (2SP)</crs:description>
                
</crs:TransformationMethod>
                
<crs:Parameter>
                  
<crs:NameSet>
                    
<crs:name>Latitude of 1st standart parallel</crs:name>
                  
</crs:NameSet>
                  
<crs:Identifier>
                    
<crs:code>8823</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                  
<crs:value>0</crs:value>
                
</crs:Parameter>
                
<crs:Parameter>
                  
<crs:NameSet>
                    
<crs:name>Longitude of natural origin</crs:name>
                  
</crs:NameSet>
                  
<crs:Identifier>
                    
<crs:code>8802</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                  
<crs:value>0</crs:value>
                
</crs:Parameter>
                
<crs:Parameter>
                  
<crs:NameSet>
                    
<crs:name>False Easting</crs:name>
                  
</crs:NameSet>
                  
<crs:Identifier>
                    
<crs:code>8806</crs:code>         
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                  
<crs:value>0</crs:value>
                
</crs:Parameter>
                
<crs:Parameter>
                  
<crs:NameSet>
                    
<crs:name>False Northing</crs:name>
                  
</crs:NameSet>
                  
<crs:Identifier>
                    
<crs:code>8807</crs:code>
                    
<crs:codeSpace>EPSG</crs:codeSpace>
                    
<crs:edition>5.2</crs:edition>
                  
</crs:Identifier>
                  
<crs:value>0</crs:value>
                
</crs:Parameter>
              
</crs:ParameterizedTransformation>
            
</crs:CoordinateTransformationDefinition>
          
</crs:ProjectedCRS>
        
</crs:CoordinateReferenceSystem>
      
</rdf:Description>
    
</rdf:RDF>
  
</metadata>

  
<!-- the actual map content -->
</svg>

7.

13 Viewport Attribute Module

The Viewport Attribute Module defines the Viewport.attrib attribute set.

Collection NameAttributes in Collection
Viewport.attribclip, overflow

7.14 DOM interfaces

The following interfaces are defined below: SVGPoint, SVGPointList, SVGMatrix, SVGTransform, SVGTransformList, SVGAnimatedTransformList, SVGPreserveAspectRatio, SVGAnimatedPreserveAspectRatio.

14 DOM interfaces

7.14.1 Interface SVGPoint

Many of the SVG DOM interfaces refer to objects of class SVGPoint. An SVGPoint is an (x,y y) coordinate pair. When used in matrix operations, an SVGPoint is treated as a vector of the form:

[x]
[y]
[1]

IDL Definition
interface SVGPoint {

  
attribute float x
; // raises DOMException on setting
 setraises(DOMException);
  attribute float y
; // raises DOMException on setting SVGPoint matrixTransform (
 setraises(DOMException);

  SVGPoint matrixTransform(in SVGMatrix matrix
);
};
Attributes:
x (float
x
)
The x coordinate.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
y (float
y
)
The y coordinate.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
Methods
matrixTransform
Operations:
SVGPoint matrixTransform(in SVGMatrix matrix)

Applies a 2x3 matrix transformation on this SVGPoint object and returns a new, transformed SVGPoint object:

newpoint = matrix * thispoint
Parameters
in SVGPoint
  1. SVGMatrix matrix
    The matrix which is to be applied to this SVGPoint object.
Return value
Returns
A new SVGPoint object.
No Exceptions

7.14.2 Interface SVGPointList

This interface defines a list of SVGPoint objects.

SVGPointList 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 SVGPointList {

  readonly attribute unsigned long numberOfItems;

  void 
clear
(
) 
raises(
DOMException
);
  SVGPoint initialize
(
in SVGPoint newItem
) 
raises(
DOMException, SVGException
);
  SVGPoint getItem
(
in unsigned long index
) 
raises(
DOMException
);
  SVGPoint insertItemBefore
(
in SVGPoint newItem, in unsigned long index
) 
raises(
DOMException, SVGException
);
  SVGPoint replaceItem
(
in SVGPoint newItem, in unsigned long index
) 
raises(
DOMException, SVGException
);
  SVGPoint removeItem
(
in unsigned long index
) 
raises(
DOMException
);
  SVGPoint appendItem
(
in SVGPoint newItem
) 
raises(
DOMException, SVGException
);
};
Attributes:
numberOfItems (readonly unsigned long
numberOfItems
)
The number of items in the list.
Methods
Operations:
void clear()
Clears all existing current items from the list, with the result being an empty list.
No Parameters
No Return Value
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGPoint initialize(in SVGPoint newItem)
Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
Parameters
in SVGPoint
  1. SVGPoint newItem
    The item which should become the only member of the list.
Return value
Returns
The item being inserted into the list.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGPoint getItem(in unsigned long index)
Returns the specified item from the list.
Parameters
in
  1. unsigned long index
    The index of the item from the list which is to be returned. The first item is number 0.
Return value
SVGPoint
Returns
The selected item.
Exceptions
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGPoint insertItemBefore(in SVGPoint newItem, in unsigned long index)
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
  1. SVGPoint newItem
    The item which is to be inserted into the list.
in
  1. 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
SVGPoint
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGPoint replaceItem(in SVGPoint newItem, in unsigned long index)
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
  1. SVGPoint newItem
    The item which is to be inserted into the list.
in
  1. unsigned long index
    The index of the item which is to be replaced. The first item is number 0.
Return value
SVGPoint
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGPoint removeItem(in unsigned long index)
Removes an existing item from the list.
Parameters
in
  1. unsigned long index
    The index of the item which is to be removed. The first item is number 0.
Return value
SVGPoint
Returns
The removed item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGPoint appendItem(in SVGPoint newItem)
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
  1. SVGPoint newItem
    The item which is to be inserted
into the list
  1. . The first item is number 0.
Return value
SVGPoint
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.

7.14.3 Interface SVGMatrix

Many of SVG's graphics operations utilize 2x3 matrices of the form:

[a c e]
[b d f]

which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become:

[a c e]
[b d f]
[0 0 1]

IDL Definition
interface SVGMatrix {

  
attribute float a
; // raises DOMException on setting
 setraises(DOMException);
  attribute float b
; // raises DOMException on setting
 setraises(DOMException);
  attribute float c
; // raises DOMException on setting
 setraises(DOMException);
  attribute float d
; // raises DOMException on setting
 setraises(DOMException);
  attribute float e
; // raises DOMException on setting
 setraises(DOMException);
  attribute float f
; // raises DOMException on setting SVGMatrix multiply (
 setraises(DOMException);

  SVGMatrix multiply(in SVGMatrix secondMatrix
);
  SVGMatrix inverse
(
) 
raises(
SVGException
);
  SVGMatrix translate
(
in float x, in float y
);
  SVGMatrix scale
(
in float scaleFactor
);
  SVGMatrix scaleNonUniform
(
in float scaleFactorX, in float scaleFactorY
);
  SVGMatrix rotate
(
in float angle
);
  SVGMatrix rotateFromVector
(
in float x, in float y
) 
raises(
SVGException
);
  SVGMatrix flipX
(
);
  SVGMatrix flipY
(
);
  SVGMatrix skewX
(
in float angle
);
  SVGMatrix skewY
(
in float angle
);
};
Attributes:
a (float
a
)
The a component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
b (float
b
)
The b component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
c (float
c
)
The c component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
d (float
d
)
The d component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
e (float
e
)
The e component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
f (float
f
)
The f component of the matrix.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
Methods
multiply
Operations:
SVGMatrix multiply(in SVGMatrix secondMatrix)
Performs matrix multiplication. This matrix is post-multiplied by another matrix, returning the resulting new matrix.
Parameters
in SVGMatrix
  1. SVGMatrix secondMatrix
    The matrix which is post-multiplied to this matrix.
Return value
Returns
The resulting matrix.
No Exceptions
Return value
SVGMatrix
SVGMatrix inverse()
Returns the inverse matrix.
No Parameters
Returns
The inverse matrix.
Exceptions
SVGException, code SVG_MATRIX_NOT_INVERTABLE
:
Raised if this matrix is not invertable.
SVGMatrix translate(in float x, in float y)
Post-multiplies a translation transformation on the current matrix and returns the resulting matrix.
Parameters
in
  1. float x
    The distance to translate along the x-axis.
in SVGMatrix
  1. float y
    The distance to translate along the y-axis.
Return value
Returns
The resulting matrix.
No Exceptions
scale
SVGMatrix scale(in float scaleFactor)
Post-multiplies a uniform scale transformation on the current matrix and returns the resulting matrix.
Parameters
in SVGMatrix
  1. float scaleFactor
    Scale factor in both X and Y.
Return value
Returns
The resulting matrix.
No Exceptions
scaleNonUniform
SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY)
Post-multiplies a non-uniform scale transformation on the current matrix and returns the resulting matrix.
Parameters
in
  1. float scaleFactorX
    Scale factor in X.
in SVGMatrix
  1. float scaleFactorY
    Scale factor in Y.
Return value
Returns
The resulting matrix.
No Exceptions
rotate
SVGMatrix rotate(in float angle)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix.
Parameters
in SVGMatrix
  1. float angle
    Rotation angle.
Return value
Returns
The resulting matrix.
No Exceptions
rotateFromVector
SVGMatrix rotateFromVector(in float x, in float y)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix. The rotation angle is determined by taking (+/-) atan(y/x). The direction of the vector (x,
y
 y) determines whether the positive or negative angle value is used.
Parameters
in
  1. float x
    The X coordinate of the vector (x,y). Must not be zero.
in SVGMatrix
  1. float y
    The Y coordinate of the vector (x,y). Must not be zero.
Return value
Returns
The resulting matrix.
Exceptions
SVGException, code SVG_INVALID_VALUE_ERR
:
Raised if one of the parameters has an invalid value.
SVGMatrix flipX()
Post-multiplies the transformation [-
1 0 0 1 0 0
Return value
SVGMatrix
1 0 0 1 0 0] and returns the resulting matrix.
No Parameters
Returns
The resulting matrix.
No Exceptions
SVGMatrix flipY()
Post-multiplies the transformation [
1 0 0 -1 0 0
Return value
SVGMatrix
1 0 0 -1 0 0] and returns the resulting matrix.
No Parameters
Returns
The resulting matrix.
No Exceptions
skewX
SVGMatrix skewX(in float angle)
Post-multiplies a skewX transformation on the current matrix and returns the resulting matrix.
Parameters
in SVGMatrix
  1. float angle
    Skew angle.
Return value
Returns
The resulting matrix.
No Exceptions
skewY
SVGMatrix skewY(in float angle)
Post-multiplies a skewY transformation on the current matrix and returns the resulting matrix.
Parameters
in SVGMatrix
  1. float angle
    Skew angle.
Return value
Returns
The resulting matrix.
No Exceptions

7.14.4 Interface SVGTransform

SVGTransform is the interface for one of the component transformations within a an SVGTransformList; thus, a an SVGTransform object corresponds to a single component (e.g., "'scale(..)" ' or "'matrix(...)"') within a 'transform' attribute specification. IDL Definition
interface SVGTransform {

  // Transform Types
  
const
unsigned short SVG_TRANSFORM_UNKNOWN 
= 0;
  
const
unsigned short SVG_TRANSFORM_MATRIX 
= 1;
  
const
unsigned short SVG_TRANSFORM_TRANSLATE = 2;
  
const
unsigned short SVG_TRANSFORM_SCALE 
= 3;
  
const
unsigned short SVG_TRANSFORM_ROTATE 
= 4;
  
const
unsigned short SVG_TRANSFORM_SKEWX 
= 5;
  
const
unsigned short SVG_TRANSFORM_SKEWY 
= 6;

  readonly attribute unsigned short type;
  readonly attribute SVGMatrix matrix;
  readonly attribute float angle;

  void setMatrix
(
in SVGMatrix matrix
);
  void setTranslate
(
in float tx, in float ty
);
  void setScale
(
in float sx, in float sy
);
  void setRotate
(
in float angle, in float cx, in float cy
);
  void setSkewX
(
in float angle
);
  void setSkewY
(
in float angle
);
};
Definition group Transform Types
Defined constants
Constants in group “Transform Types”:
SVG_TRANSFORM_UNKNOWN (unsigned short)
The unit 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_TRANSFORM_MATRIX (unsigned short)
A
"
'matrix(
...
)
"
' transformation.
SVG_TRANSFORM_TRANSLATE (unsigned short)
A
"
'translate(
...
)
"
' transformation.
SVG_TRANSFORM_SCALE (unsigned short)
A
"
'scale(
...
)
"
' transformation.
SVG_TRANSFORM_ROTATE (unsigned short)
A
"
'rotate(
...
)
"
' transformation.
SVG_TRANSFORM_SKEWX (unsigned short)
A
"
'skewX(
...
)
"
' transformation.
SVG_TRANSFORM_SKEWY (unsigned short)
A
"
'skewY(
...
)
"
' transformation.
Attributes:
type (readonly unsigned short
type
)
The type of the value as specified by one of the
constants specified above.
readonly SVGMatrix matrix
SVG_TRANSFORM_* constants defined on this interface.
matrix (readonly SVGMatrix)

The matrix that represents this transformation

.

:

  • For SVG_TRANSFORM_MATRIX, the matrix contains the a, b, c, d, e, f values supplied by the user.
  • For SVG_TRANSFORM_TRANSLATE, e and f represent the translation amounts (a=1, b=0, c=0
,
  • and d=1).
  • For SVG_TRANSFORM_SCALE, a and d represent the
scale
  • translation amounts (
b
  • a=0,
c
  • b=0,
e
  • c=0
,f
  • and d=
0
  • 1).
  • For SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY, a, b, c and d represent the matrix which will result in the given transformation (e=0
,
  • and f=0).
angle (readonly float
angle
)

A convenience attribute for SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY. It holds the angle that was specified.

For SVG_TRANSFORM_MATRIX, SVG_TRANSFORM_TRANSLATE and SVG_TRANSFORM_SCALE, angle will be zero.

Methods
setMatrix
Operations:
void setMatrix(in SVGMatrix matrix)
Sets the transform type to SVG_TRANSFORM_MATRIX, with parameter matrix defining the new transformation.
Parameters
in
  1. SVGMatrix matrix
    The new matrix for the transformation.
No Return Value
No Exceptions
setTranslate
void setTranslate(in float tx, in float ty)
Sets the transform type to SVG_TRANSFORM_TRANSLATE, with parameters tx and ty defining the translation amounts.
Parameters
in
  1. float tx
    The translation amount in X.
in
  1. float ty
    The translation amount in Y.
No Return Value
No Exceptions
setScale
void setScale(in float sx, in float sy)
Sets the transform type to SVG_TRANSFORM_SCALE, with parameters sx and sy defining the scale amounts.
Parameters
in
  1. float sx
    The scale
factor
  1. amount in X.
in
  1. float sy
    The scale
factor
  1. amount in Y.
No Return Value
No Exceptions
setRotate
void setRotate(in float angle, in float cx, in float cy)
Sets the transform type to SVG_TRANSFORM_ROTATE, with parameter angle defining the rotation angle and parameters cx and cy defining the optional
centre
center of rotation.
Parameters
in
  1. float angle
    The rotation angle.
in
  1. float cx
    The x coordinate of
centre
  1. center of rotation.
in
  1. float cy
    The y coordinate of
centre
setSkewX
  1. center of rotation.
No Return Value
No Exceptions
void setSkewX(in float angle)
Sets the transform type to SVG_TRANSFORM_SKEWX, with parameter angle defining the amount of skew.
Parameters
in
  1. float angle
    The skew angle.
No Return Value
No Exceptions
setSkewY
void setSkewY(in float angle)
Sets the transform type to SVG_TRANSFORM_SKEWY, with parameter angle defining the amount of skew.
Parameters
in
  1. float angle
    The skew angle.
No Return Value
No Exceptions

7.14.5 Interface SVGTransformList

This interface defines a list of SVGTransform objects.

The SVGTransformList and SVGTransform interfaces correspond to the various attributes which specify a set of transformations, such as the 'transform' attribute which is available for many of SVG's elements.

SVGTransformList 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 SVGTransformList {

  readonly attribute unsigned long numberOfItems;

  void 
clear
(
) 
raises(
DOMException
);
  SVGTransform initialize
(
in SVGTransform newItem
) 
raises(
DOMException, SVGException
);
  SVGTransform getItem
(
in unsigned long index
) 
raises(
DOMException
);
  SVGTransform insertItemBefore
(
in SVGTransform newItem, in unsigned long index
) 
raises(
DOMException, SVGException
);
  SVGTransform replaceItem
(
in SVGTransform newItem, in unsigned long index
) 
raises(
DOMException, SVGException
);
  SVGTransform removeItem
(
in unsigned long index
) 
raises(
DOMException
);
  SVGTransform appendItem
(
in SVGTransform newItem
) 
raises(
DOMException, SVGException
);
  SVGTransform createSVGTransformFromMatrix
(
in SVGMatrix matrix
);
  SVGTransform consolidate
(
);
};
Attributes:
numberOfItems (readonly unsigned long
numberOfItems
)
The number of items in the list.
Methods
Operations:
void clear()
Clears all existing current items from the list, with the result being an empty list.
No Parameters
No Return Value
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGTransform initialize(in SVGTransform newItem)
Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
Parameters
in
  1. SVGTransform newItem
    The item which should become the only member of the list.
Return value
SVGTransform
Returns
The item being inserted into the list.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGTransform getItem(in unsigned long index)
Returns the specified item from the list.
Parameters
in SVGTransform
  1. unsigned long index
    The index of the item from the list which is to be returned. The first item is number 0.
Return value
Returns
The selected item.
Exceptions
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGTransform insertItemBefore(in SVGTransform newItem, in unsigned long index)
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
  1. SVGTransform newItem
    The item which is to be inserted into the list.
in SVGTransform
  1. 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
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGTransform replaceItem(in SVGTransform newItem, in unsigned long index)
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
  1. SVGTransform newItem
    The item which is to be inserted into the list.
in SVGTransform
  1. unsigned long index
    The index of the item which is to be replaced. The first item is number 0.
Return value
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGTransform removeItem(in unsigned long index)
Removes an existing item from the list.
Parameters
in SVGTransform
  1. unsigned long index
    The index of the item which is to be removed. The first item is number 0.
Return value
Returns
The removed item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
:
Raised if the index number is negative or greater than or equal to numberOfItems.
SVGTransform appendItem(in SVGTransform newItem)
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
  1. SVGTransform newItem
    The item which is to be inserted
into the listSVGTransform
  1. . The first item is number 0.
Return value
Returns
The inserted item.
Exceptions
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised when the list cannot be modified.
SVGException, code SVG_WRONG_TYPE_ERR
:
Raised if parameter newItem is the wrong type of object for the given list.
SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix)
Creates an SVGTransform object which is initialized to transform of type SVG_TRANSFORM_MATRIX and whose values are the given matrix.
Parameters
in
  1. SVGMatrix matrix
    The matrix which defines the transformation.
Return value
SVGTransform
Returns
The returned SVGTransform object.
No Exceptions
Return value
SVGTransform
SVGTransform consolidate()
Consolidates the list of separate SVGTransform objects by multiplying the equivalent transformation matrices together to result in a list consisting of a single SVGTransform object of type SVG_TRANSFORM_MATRIX.
No Parameters
Returns
The resulting SVGTransform object which becomes single item in the list. If the list was empty, then a value of null is returned.
No Exceptions

7.14.6 Interface SVGAnimatedTransformList

Used for the various attributes which specify a set of transformations, such as the 'transform' attribute which is available for many of SVG's elements, and which can be animated. IDL Definition
interface SVGAnimatedTransformList {
  
readonly attribute SVGTransformList baseVal;
  readonly attribute SVGTransformList animVal;
};
Attributes:
baseVal (readonly SVGTransformList
baseVal
)
The base value of the given attribute before applying any animations.
animVal (readonly SVGTransformList
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
'
.

7.14.7 Interface SVGPreserveAspectRatio

The SVGPreserveAspectRatio interface corresponds to the 'preserveAspectRatio' attribute, which is available for some of SVG's elements. IDL Definition
interface SVGPreserveAspectRatio {

  // Alignment Types
  
const
unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN 
= 0;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_NONE 
= 1;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
  
const
unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;

  // Meet-or-slice Types
  
const
unsigned short SVG_MEETORSLICE_UNKNOWN 
= 0;
  
const
unsigned short SVG_MEETORSLICE_MEET 
= 1;
  
const
unsigned short SVG_MEETORSLICE_SLICE = 2;

  
attribute unsigned short align
; // raises DOMException on setting
 setraises(DOMException);
  attribute unsigned short meetOrSlice
; // raises DOMException on setting };
Definition group Alignment Types
Defined constants
 setraises(DOMException);
};
Constants in group “Alignment Types”:
SVG_PRESERVEASPECTRATIO_UNKNOWN (unsigned short)
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_PRESERVEASPECTRATIO_NONE (unsigned short)
Corresponds to value 'none' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMINYMIN (unsigned short)
Corresponds to value 'xMinYMin' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMIDYMIN (unsigned short)
Corresponds to value 'xMidYMin' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMAXYMIN (unsigned short)
Corresponds to value 'xMaxYMin' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMINYMID (unsigned short)
Corresponds to value '
xMinYMid
XMinYMid' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMIDYMID (unsigned short)
Corresponds to value 'xMidYMid' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMAXYMID (unsigned short)
Corresponds to value 'xMaxYMid' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMINYMAX (unsigned short)
Corresponds to value 'xMinYMax' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMIDYMAX (unsigned short)
Corresponds to value 'xMidYMax' for attribute 'preserveAspectRatio'.
SVG_PRESERVEASPECTRATIO_XMAXYMAX (unsigned short)
Corresponds to value 'xMaxYMax' for attribute 'preserveAspectRatio'.
Definition
Constants in group
Meet
“Meet-or-slice
Types
Defined constants
Types”:
SVG_MEETORSLICE_UNKNOWN(unsigned short)
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_MEETORSLICE_MEET(unsigned short)
Corresponds to value 'meet' for attribute 'preserveAspectRatio'.
SVG_MEETORSLICE_SLICE(unsigned short)
Corresponds to value 'slice' for attribute 'preserveAspectRatio'.
Attributes:
align (unsigned short
align
)
The type of the alignment value as specified by one of the
constants specified above
SVG_PRESERVEASPECTRATIO_* constants defined on this interface.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.
meetOrSlice (unsigned short
meetOrSlice
)
The type of the meet-or-slice value as specified by one of the
constants specified above
SVG_MEETORSLICE_* constants defined on this interface.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
:
Raised on an attempt to change the value of a readonly attribute.

7.14.8 Interface SVGAnimatedPreserveAspectRatio

Used for attributes of type SVGPreserveAspectRatio which can be animated. IDL Definition
interface SVGAnimatedPreserveAspectRatio {
  
readonly attribute SVGPreserveAspectRatio baseVal;
  readonly attribute SVGPreserveAspectRatio animVal;
};
Attributes:
baseVal (readonly SVGPreserveAspectRatio
baseVal
)
The base value of the given attribute before applying any animations.
animVal (readonly SVGPreserveAspectRatio
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
'.
.
SVG 1.1 (Second Edition) – 16 May 2009