Module org.htmlunit

Class SVGMatrix

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.svg.SVGMatrix
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class SVGMatrix extends HtmlUnitScriptable
JavaScript host object for SVGMatrix.
Author:
Marc Guillemot, Ronald Brill
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction
  • Field Summary

    Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    isSealed

    Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance.
    SVGMatrix(org.htmlunit.corejs.javascript.VarScope scope)
    Instantiates and configures the scope and prototype.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new matrix that is the result of flipping this matrix along the x-axis.
    Returns a new matrix that is the result of flipping this matrix along the y-axis.
    double
    Returns the a entry of the matrix.
    double
    Returns the b entry of the matrix.
    double
    Returns the c entry of the matrix.
    double
    Returns the d entry of the matrix.
    double
    Returns the e entry of the matrix.
    double
    Returns the f entry of the matrix.
    Returns the inverse of this matrix.
    void
    Creates an instance of this object.
    Returns a new matrix that is the result of multiplying this matrix by the given matrix.
    rotate(double angle)
    Returns a new matrix that is the result of rotating this matrix by the given angle.
    rotateFromVector(double x, double y)
    Returns a new matrix that is the result of rotating this matrix by the angle defined by the given vector.
    scale(double factor)
    Returns a new matrix that is the result of scaling this matrix uniformly by the given factor.
    scaleNonUniform(double factorX, double factorY)
    Returns a new matrix that is the result of scaling this matrix non-uniformly by the given factors along each axis.
    void
    setA(double newValue)
    Sets the a entry of the matrix.
    void
    setB(double newValue)
    Sets the b entry of the matrix.
    void
    setC(double newValue)
    Sets the c entry of the matrix.
    void
    setD(double newValue)
    Sets the d entry of the matrix.
    void
    setE(double newValue)
    Sets the e entry of the matrix.
    void
    setF(double newValue)
    Sets the f entry of the matrix.
    skewX(double angle)
    Returns a new matrix that is the result of skewing this matrix along the x-axis by the given angle.
    skewY(double angle)
    Returns a new matrix that is the result of skewing this matrix along the y-axis by the given angle.
    translate(double x, double y)
    Returns a new matrix that is the result of translating this matrix by the given distances.

    Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMaps

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.htmlunit.corejs.javascript.Scriptable

    get, getIds, has, has

    Methods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable

    get, has
  • Constructor Details

    • SVGMatrix

      public SVGMatrix()
      Creates an instance.
    • SVGMatrix

      public SVGMatrix(org.htmlunit.corejs.javascript.VarScope scope)
      Instantiates and configures the scope and prototype.
      Parameters:
      scope - the parent scope
  • Method Details

    • jsConstructor

      public void jsConstructor()
      Creates an instance of this object.
    • getA

      public double getA()
      Returns the a entry of the matrix.
      Returns:
      the field
    • getB

      public double getB()
      Returns the b entry of the matrix.
      Returns:
      the field
    • getC

      public double getC()
      Returns the c entry of the matrix.
      Returns:
      the field
    • getD

      public double getD()
      Returns the d entry of the matrix.
      Returns:
      the field
    • getE

      public double getE()
      Returns the e entry of the matrix.
      Returns:
      the field
    • getF

      public double getF()
      Returns the f entry of the matrix.
      Returns:
      the field
    • setA

      public void setA(double newValue)
      Sets the a entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • setB

      public void setB(double newValue)
      Sets the b entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • setC

      public void setC(double newValue)
      Sets the c entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • setD

      public void setD(double newValue)
      Sets the d entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • setE

      public void setE(double newValue)
      Sets the e entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • setF

      public void setF(double newValue)
      Sets the f entry of the matrix.
      Parameters:
      newValue - the new value for the field
    • flipX

      public SVGMatrix flipX()
      Returns a new matrix that is the result of flipping this matrix along the x-axis.
      Returns:
      the resulting matrix
    • flipY

      public SVGMatrix flipY()
      Returns a new matrix that is the result of flipping this matrix along the y-axis.
      Returns:
      the resulting matrix
    • inverse

      public SVGMatrix inverse()
      Returns the inverse of this matrix.
      Returns:
      the resulting matrix
    • multiply

      public SVGMatrix multiply(SVGMatrix by)
      Returns a new matrix that is the result of multiplying this matrix by the given matrix.
      Parameters:
      by - the matrix to multiply by
      Returns:
      the resulting matrix
    • rotate

      public SVGMatrix rotate(double angle)
      Returns a new matrix that is the result of rotating this matrix by the given angle.
      Parameters:
      angle - the rotation angle in degrees
      Returns:
      the resulting matrix
    • rotateFromVector

      public SVGMatrix rotateFromVector(double x, double y)
      Returns a new matrix that is the result of rotating this matrix by the angle defined by the given vector.
      Parameters:
      x - the x-coordinate of the vector
      y - the y-coordinate of the vector
      Returns:
      the resulting matrix
    • scale

      public SVGMatrix scale(double factor)
      Returns a new matrix that is the result of scaling this matrix uniformly by the given factor.
      Parameters:
      factor - the scale factor
      Returns:
      the resulting matrix
    • scaleNonUniform

      public SVGMatrix scaleNonUniform(double factorX, double factorY)
      Returns a new matrix that is the result of scaling this matrix non-uniformly by the given factors along each axis.
      Parameters:
      factorX - the scale factor along the x-axis
      factorY - the scale factor along the y-axis
      Returns:
      the resulting matrix
    • skewX

      public SVGMatrix skewX(double angle)
      Returns a new matrix that is the result of skewing this matrix along the x-axis by the given angle.
      Parameters:
      angle - the skew angle in degrees
      Returns:
      the resulting matrix
    • skewY

      public SVGMatrix skewY(double angle)
      Returns a new matrix that is the result of skewing this matrix along the y-axis by the given angle.
      Parameters:
      angle - the skew angle in degrees
      Returns:
      the resulting matrix
    • translate

      public SVGMatrix translate(double x, double y)
      Returns a new matrix that is the result of translating this matrix by the given distances.
      Parameters:
      x - the distance to translate along the x-axis
      y - the distance to translate along the y-axis
      Returns:
      the resulting matrix