Skip to main content

SVGTransformList

The SVGTransformList interface defines a list of SVGTransform objects.

MDN Reference

Indexable

[index: number]: SVGTransform

Methods

[iterator]()

iterator: ArrayIterator<SVGTransform>;

Returns

ArrayIterator<SVGTransform>


appendItem()

appendItem(newItem): SVGTransform;

The appendItem() method of the SVGTransformList interface inserts a new item at the end of the list.

MDN Reference

Parameters

ParameterType
newItemSVGTransform

Returns

SVGTransform


clear()

clear(): void;

The clear() method of the SVGTransformList interface clears all existing current items from the list, with the result being an empty list.

MDN Reference

Returns

void


consolidate()

consolidate(): SVGTransform | null;

The consolidate() method of the SVGTransformList interface 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.

MDN Reference

Returns

SVGTransform | null


createSVGTransformFromMatrix()

createSVGTransformFromMatrix(matrix?): SVGTransform;

The createSVGTransformFromMatrix() method of the SVGTransformList interface creates an SVGTransform object which is initialized to a transform of type SVG_TRANSFORM_MATRIX and whose values are the given matrix.

MDN Reference

Parameters

ParameterType
matrix?DOMMatrix2DInit

Returns

SVGTransform


getItem()

getItem(index): SVGTransform;

The getItem() method of the SVGTransformList interface returns the specified item from the list.

MDN Reference

Parameters

ParameterType
indexnumber

Returns

SVGTransform


initialize()

initialize(newItem): SVGTransform;

The initialize() method of the SVGTransformList interface clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.

MDN Reference

Parameters

ParameterType
newItemSVGTransform

Returns

SVGTransform


insertItemBefore()

insertItemBefore(newItem, index): SVGTransform;

The insertItemBefore() method of the SVGTransformList interface inserts a new item into the list at the specified position.

MDN Reference

Parameters

ParameterType
newItemSVGTransform
indexnumber

Returns

SVGTransform


removeItem()

removeItem(index): SVGTransform;

The removeItem() method of the SVGTransformList interface removes an existing item from the list.

MDN Reference

Parameters

ParameterType
indexnumber

Returns

SVGTransform


replaceItem()

replaceItem(newItem, index): SVGTransform;

The replaceItem() method of the SVGTransformList interface replaces an existing item in the list with a new item.

MDN Reference

Parameters

ParameterType
newItemSVGTransform
indexnumber

Returns

SVGTransform

Properties

length

readonly length: number;

The length read-only property of the SVGTransformList interface represents the number of items in the list.

MDN Reference


numberOfItems

readonly numberOfItems: number;

The numberOfItems read-only property of the SVGTransformList interface represents the number of items in the list.

MDN Reference