SVGTransformList Interface
The SVGTransformList
defines a list of SVGTransform
objects.
An SVGTransformList
object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
Starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6)
,the SVGTransformList
DOM interface is now indexable and can be accessed like Arrays
Methods
Code SVGTransform appendItem(SVGTransform item) #
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. The inserted item is the item itself and not a copy.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGTransform appendItem(SVGTransform item);
Code void clear() #
Clears all existing current items from the list, with the result being an empty list.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only.
void clear();
Code SVGTransform consolidate() #
SVGTransform consolidate();
Code SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) #
SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
Code SVGTransform getItem(int index) #
Returns the specified item from the list. The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list. The first item is number 0.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGTransform getItem(int index);
Code SVGTransform initialize(SVGTransform item) #
Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. The return value is the item inserted into the list.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGTransform initialize(SVGTransform item);
Code SVGTransform insertItemBefore(SVGTransform item, int 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. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to insert before is before the removal of the item. 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.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGTransform insertItemBefore(SVGTransform item, int index);
Code SVGTransform removeItem(int index) #
Removes an existing item from the list.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only. - a
DOMException
with codeINDEX_SIZE_ERR
is raised if the index number is greater than or equal tonumberOfItems
.
SVGTransform removeItem(int index);
Code SVGTransform replaceItem(SVGTransform item, int 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. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.
Exceptions:
- a
DOMException
with codeNO_MODIFICATION_ALLOWED_ERR
is raised when the list corresponds to a read only attribute or when the object itself is read only. - a
DOMException
with codeINDEX_SIZE_ERR
is raised if the index number is greater than or equal tonumberOfItems
.
SVGTransform replaceItem(SVGTransform item, int index);
Fields
This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.