* Copyright 2012 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
SVGTransform is the interface for one of the component transformations within an
; thus, an
SVGTransform object corresponds to a single component (e.g.,
matrix(…)) within a
SVGTransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
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, the matrix contains the a, b, c, d, e, f values supplied by the user.
SVG_TRANSFORM_TRANSLATE, e and f represent the translation amounts (a=1, b=0, c=0 and d=1).
SVG_TRANSFORM_SCALE, a and d represent the scale amounts (b=0, c=0, e=0 and f=0).
SVG_TRANSFORM_SKEWY, a, b, c and d represent the matrix which will result in the given skew (e=0 and f=0).
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.
Sets the transform type to
SVG_TRANSFORM_ROTATE, with parameter
angle defining the rotation angle and parameters
cy defining the optional center of rotation.
NO_MODIFICATION_ALLOWED_ERRis raised when attempting to modify a read only attribute or when the object itself is read only.