extern class js.html.svg.TransformAvailable in js

SVGTransform is the interface for 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.

An SVGTransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.

Documentation for this class was provided by MDN.
var angle(default,null) : FloatA convenience attribute for SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY. It holds the angle that was specified.

var matrix(default,null) : Matrix

The matrix that represents this transformation. The matrix object is live, meaning that any changes made to the SVGTransform object are immediately reflected in the matrix object and vice versa. In case the matrix object is changed directly (i.e., without using the methods on the SVGTransform interface itself) then the type of the SVGTransform changes to SVG_TRANSFORM_MATRIX.

  • 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 amounts (b=0, c=0, e=0 and f=0).
  • For SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY, a, b, c and d represent the matrix which will result in the given skew (e=0 and f=0).
  • For SVG_TRANSFORM_ROTATE, a, b, c, d, e and f together represent the matrix which will result in the given rotation. When the rotation is around the center point (0, 0), e and f will be zero.
var type(default,null) : IntThe type of the value as specified by one of the SVG_TRANSFORM_* constants defined on this interface. function setMatrix( matrix : Matrix ) : Void function setRotate( angle : Float, cx : Float, cy : Float ) : Void function setScale( sx : Float, sy : Float ) : Void function setSkewX( angle : Float ) : Void function setSkewY( angle : Float ) : Void function setTranslate( tx : Float, ty : Float ) : Void static inline var SVG_TRANSFORM_MATRIX : IntA matrix(…) transformation static inline var SVG_TRANSFORM_ROTATE : Int static inline var SVG_TRANSFORM_SCALE : IntA scale(…) transformation static inline var SVG_TRANSFORM_SKEWX : Int static inline var SVG_TRANSFORM_SKEWY : Int static inline var SVG_TRANSFORM_TRANSLATE : IntA translate(…) transformation static inline var SVG_TRANSFORM_UNKNOWN : IntThe 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.
version #19164, modified 2013-05-08 11:04:05 by api
0 comment