@DOMObjectAttribute @DOMNameAttribute(name="SVGTransform") public class SVGTransform extends SVGValueType
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 specification.
Modifier and Type | Field and Description |
---|---|
static int |
SVG_TRANSFORM_MATRIX
A 'matrix(…)' transformation.
|
static int |
SVG_TRANSFORM_ROTATE
A 'rotate(…)' transformation.
|
static int |
SVG_TRANSFORM_SCALE
A 'scale(…)' transformation.
|
static int |
SVG_TRANSFORM_SKEWX
A 'skewX(…)' transformation.
|
static int |
SVG_TRANSFORM_SKEWY
A 'skewY(…)' transformation.
|
static int |
SVG_TRANSFORM_TRANSLATE
A 'translate(…)' transformation.
|
static int |
SVG_TRANSFORM_UNKNOWN
The unit type is not one of predefined types.
|
flags
PropertyChanged, PropertyChangedDelegate
Constructor and Description |
---|
SVGTransform() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
deepClone()
Creates a new object that is a copy of the current instance.
|
float |
getAngle()
A convenience attribute for SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY.
|
com.aspose.ms.System.Collections.Generic.IGenericList<java.lang.Float> |
getArguments() |
SVGMatrix |
getMatrix()
The matrix that represents this transformation.
|
int |
getType()
The type of the value as specified by one of the SVG_TRANSFORM_* constants defined on this interface.
|
void |
setMatrix(SVGMatrix matrix)
Sets the transform type to SVG_TRANSFORM_MATRIX, with parameter matrix defining the new transformation.
|
void |
setRotate(float angle,
float cx,
float cy)
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.
|
void |
setScale(float sx,
float sy)
Sets the transform type to SVG_TRANSFORM_SCALE, with parameters sx and sy defining the scale amounts.
|
void |
setSkewX(float angle)
Sets the transform type to SVG_TRANSFORM_SKEWX, with parameter angle defining the amount of skew.
|
void |
setSkewY(float angle)
Sets the transform type to SVG_TRANSFORM_SKEWY, with parameter angle defining the amount of skew.
|
void |
setTranslate(float tx,
float ty)
Sets the transform type to SVG_TRANSFORM_TRANSLATE, with parameters tx and ty defining the translation amounts.
|
asReadOnly, dispose, dispose, getKey, isDetached, isObserverSuppressed, isReadOnly, notifyPropertyChanged, setDetached, setObserverSuppressed, toString
fireNotifyPropertyChanged, getCurrentValues, getRuntimesBinding, setCurrentValues, setField, setRuntimesBinding
@DOMNameAttribute(name="SVG_TRANSFORM_UNKNOWN") public static final int SVG_TRANSFORM_UNKNOWN
The unit type is not one of predefined 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.
@DOMNameAttribute(name="SVG_TRANSFORM_MATRIX") public static final int SVG_TRANSFORM_MATRIX
A 'matrix(…)' transformation.
@DOMNameAttribute(name="SVG_TRANSFORM_TRANSLATE") public static final int SVG_TRANSFORM_TRANSLATE
A 'translate(…)' transformation.
@DOMNameAttribute(name="SVG_TRANSFORM_SCALE") public static final int SVG_TRANSFORM_SCALE
A 'scale(…)' transformation.
@DOMNameAttribute(name="SVG_TRANSFORM_ROTATE") public static final int SVG_TRANSFORM_ROTATE
A 'rotate(…)' transformation.
@DOMNameAttribute(name="SVG_TRANSFORM_SKEWX") public static final int SVG_TRANSFORM_SKEWX
A 'skewX(…)' transformation.
@DOMNameAttribute(name="SVG_TRANSFORM_SKEWY") public static final int SVG_TRANSFORM_SKEWY
A 'skewY(…)' transformation.
@DOMNameAttribute(name="type") public int getType()
The type of the value as specified by one of the SVG_TRANSFORM_* constants defined on this interface.
Value: The transformation type.@DOMNameAttribute(name="matrix") public SVGMatrix getMatrix()
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.
Value: The matrix that represents this transformation.@DOMNameAttribute(name="setMatrix") public void setMatrix(SVGMatrix matrix)
Sets the transform type to SVG_TRANSFORM_MATRIX, with parameter matrix defining the new transformation. The values from the parameter matrix are copied, the matrix parameter does not replace SVGTransform::matrix.
matrix
- The new matrix for the transformation.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.@DOMNameAttribute(name="angle") public float getAngle()
A convenience attribute for SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SKEWX and SVG_TRANSFORM_SKEWY. It holds the angle that was specified. For SVG_TRANSFORM_MATRIX, SVG_TRANSFORM_TRANSLATE and SVG_TRANSFORM_SCALE, angle will be zero.
Value: The angle that was specified.@DOMNameAttribute(name="setTranslate") public void setTranslate(float tx, float ty)
Sets the transform type to SVG_TRANSFORM_TRANSLATE, with parameters tx and ty defining the translation amounts.
tx
- The translation amount in X.ty
- The translation amount in Y.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.@DOMNameAttribute(name="setScale") public void setScale(float sx, float sy)
Sets the transform type to SVG_TRANSFORM_SCALE, with parameters sx and sy defining the scale amounts.
sx
- The scale amount in X.sy
- The scale amount in Y.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.@DOMNameAttribute(name="setRotate") public void setRotate(float angle, float cx, float cy)
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.
angle
- The rotation angle.cx
- The x coordinate of center of rotation.cy
- The y coordinate of center of rotation.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.@DOMNameAttribute(name="setSkewX") public void setSkewX(float angle)
Sets the transform type to SVG_TRANSFORM_SKEWX, with parameter angle defining the amount of skew.
angle
- The skew angle.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.@DOMNameAttribute(name="setSkewY") public void setSkewY(float angle)
Sets the transform type to SVG_TRANSFORM_SKEWY, with parameter angle defining the amount of skew.
angle
- The skew angle.DOMException
- Code DOMException.NO_MODIFICATION_ALLOWED_ERR
.
Raised on an attempt to change the value of a read only attribute.public java.lang.Object deepClone()
Creates a new object that is a copy of the current instance.
deepClone
in class SVGValueType
public com.aspose.ms.System.Collections.Generic.IGenericList<java.lang.Float> getArguments()