SVGTransform

open class SVGTransform(source)

The SVGTransform interface reflects one of the component transformations within an SVGTransformList; thus, an SVGTransform object corresponds to a single component (e.g., scale(…) or matrix(…)) within a transform attribute.

MDN Reference

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface Type

Properties

Link copied to clipboard

The angle read-only property of the SVGTransform interface represents the angle of the transformation in degrees.

Link copied to clipboard

The matrix read-only property of the SVGTransform interface represents the transformation matrix that corresponds to the transformation type.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The type read-only property of the SVGTransform interface represents the type of transformation applied, specified by one of the SVG_TRANSFORM_* constants defined on this interface.

Functions

Link copied to clipboard
fun setMatrix(matrix: DOMMatrixReadOnly = definedExternally)

The setMatrix() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_MATRIX, with parameter matrix defining the new transformation.

Link copied to clipboard
fun setRotate(angle: Float, cx: Float, cy: Float)

The setRotate() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_ROTATE, with parameter angle defining the rotation angle and parameters cx and cy defining the optional center of rotation.

Link copied to clipboard
fun setScale(sx: Float, sy: Float)

The setScale() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_SCALE, with parameters sx and sy defining the scale amounts.

Link copied to clipboard
fun setSkewX(angle: Float)

The setSkewX() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_SKEWX, with parameter angle defining the amount of skew along the X-axis.

Link copied to clipboard
fun setSkewY(angle: Float)

The setSkewY() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_SKEWY, with parameter angle defining the amount of skew along the Y-axis.

Link copied to clipboard
fun setTranslate(tx: Float, ty: Float)

The setTranslate() method of the SVGTransform interface sets the transform type to SVG_TRANSFORM_TRANSLATE, with parameters tx and ty defining the translation amounts.