|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
org.vectomatic.dom.svg.OMSVGMatrix
public class OMSVGMatrix
Many of SVG's graphics operations utilize 2x3 matrices of the form:
[a c e] [b d f]
which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become:
[a c e] [b d f] [0 0 1]
Constructor Summary | |
---|---|
protected |
OMSVGMatrix()
|
Method Summary | |
---|---|
OMSVGMatrix |
flipX()
Post-multiplies the transformation [-1 0 0 1 0 0] and returns the resulting matrix. |
OMSVGMatrix |
flipY()
Post-multiplies the transformation [1 0 0 -1 0 0] and returns the resulting matrix. |
float |
getA()
The a component of the matrix. |
float |
getB()
The b component of the matrix. |
float |
getC()
The c component of the matrix. |
float |
getD()
The d component of the matrix. |
String |
getDescription()
Returns a textual description of the matrix for debugging purposes. |
float |
getE()
The e component of the matrix. |
float |
getF()
The f component of the matrix. |
OMSVGMatrix |
inverse()
Returns the inverse matrix. |
boolean |
isIdentity()
Returns true if this matrix is the identity matrix |
OMSVGMatrix |
multiply(OMSVGMatrix secondMatrix)
Performs matrix multiplication. |
OMSVGMatrix |
rotate(float angle)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix. |
OMSVGMatrix |
rotateFromVector(float x,
float y)
Post-multiplies a rotation transformation on the current matrix and returns the resulting matrix. |
OMSVGMatrix |
scale(float scaleFactor)
Post-multiplies a uniform scale transformation on the current matrix and returns the resulting matrix. |
OMSVGMatrix |
scaleNonUniform(float scaleFactorX,
float scaleFactorY)
Post-multiplies a non-uniform scale transformation on the current matrix and returns the resulting matrix. |
void |
setA(float value)
The a component of the matrix. |
void |
setB(float value)
The b component of the matrix. |
void |
setC(float value)
The c component of the matrix. |
void |
setD(float value)
The d component of the matrix. |
void |
setE(float value)
The e component of the matrix. |
void |
setF(float value)
The f component of the matrix. |
OMSVGMatrix |
skewX(float angle)
Post-multiplies a skewX transformation on the current matrix and returns the resulting matrix. |
OMSVGMatrix |
skewY(float angle)
Post-multiplies a skewY transformation on the current matrix and returns the resulting matrix. |
OMSVGMatrix |
translate(float x,
float y)
Post-multiplies a translation transformation on the current matrix and returns the resulting matrix. |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected OMSVGMatrix()
Method Detail |
---|
public final float getA()
public final void setA(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final float getB()
public final void setB(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final float getC()
public final void setC(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final float getD()
public final void setD(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final float getE()
public final void setE(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final float getF()
public final void setF(float value) throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR)
- Raised on an attempt
to change the value of a read only
attribute.
com.google.gwt.core.client.JavaScriptException
public final OMSVGMatrix multiply(OMSVGMatrix secondMatrix)
secondMatrix
- The matrix which is post-multiplied to this matrix.
public final OMSVGMatrix inverse() throws com.google.gwt.core.client.JavaScriptException
SVGException(SVG_MATRIX_NOT_INVERTABLE)
- Raised if this matrix is
not invertable.
com.google.gwt.core.client.JavaScriptException
public final OMSVGMatrix translate(float x, float y)
x
- The distance to translate along the x-axis.y
- The distance to translate along the y-axis.
public final OMSVGMatrix scale(float scaleFactor)
scaleFactor
- Scale factor in both X and Y.
public final OMSVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY)
scaleFactorX
- Scale factor in X.scaleFactorY
- Scale factor in Y.
public final OMSVGMatrix rotate(float angle)
angle
- Rotation angle.
public final OMSVGMatrix rotateFromVector(float x, float y) throws com.google.gwt.core.client.JavaScriptException
x
- The X coordinate of the vector (x,y). Must not be zero.y
- The Y coordinate of the vector (x,y). Must not be zero.
SVGException(SVG_INVALID_VALUE_ERR)
- Raised if one of the parameters
has an invalid value.
com.google.gwt.core.client.JavaScriptException
public final OMSVGMatrix flipX()
public final OMSVGMatrix flipY()
public final OMSVGMatrix skewX(float angle)
angle
- Skew angle.
public final OMSVGMatrix skewY(float angle)
angle
- Skew angle.
public final String getDescription()
public final boolean isIdentity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |