affinetransform.js
No description.

File Location

/goog/graphics/affinetransform.js

Classes

goog.graphics.AffineTransform
Creates a 2D affine transform. An affine transform performs a linear mapping from 2D coordinates to other 2D coordinates that preserves the "straightness" and "parallelness" of lines. Such a coordinate transformation can be represented by a 3 row by 3 column matrix with an implied last row of [ 0 0 1 ]. This matrix transforms source coordinates (x,y) into destination coordinates (x',y') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:
     [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
     [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
     [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
This class is optimized for speed and minimizes calculations based on its knowledge of the underlying matrix (as opposed to say simply performing matrix multiplication).

Public Protected Private

Global Functions

goog.graphics.AffineTransform.getRotateInstance(thetaxy) !goog.graphics.AffineTransform
Creates a transform representing a rotation transformation.
Arguments:
theta : number
The angle of rotation measured in radians.
x : number
The x coordinate of the anchor point.
y : number
The y coordinate of the anchor point.
Returns: !goog.graphics.AffineTransform  A transform representing a rotation transformation.
code »
goog.graphics.AffineTransform.getScaleInstance(sxsy) !goog.graphics.AffineTransform
Creates a transform representing a scaling transformation.
Arguments:
sx : number
The x-axis scaling factor.
sy : number
The y-axis scaling factor.
Returns: !goog.graphics.AffineTransform  A transform representing a scaling transformation.
code »
goog.graphics.AffineTransform.getShearInstance(shxshy) !goog.graphics.AffineTransform
Creates a transform representing a shearing transformation.
Arguments:
shx : number
The x-axis shear factor.
shy : number
The y-axis shear factor.
Returns: !goog.graphics.AffineTransform  A transform representing a shearing transformation.
code »
goog.graphics.AffineTransform.getTranslateInstance(dxdy) !goog.graphics.AffineTransform
Creates a transform representing a translation transformation.
Arguments:
dx : number
The distance to translate in the x direction.
dy : number
The distance to translate in the y direction.
Returns: !goog.graphics.AffineTransform  A transform representing a translation transformation.
code »

Directory graphics

File Reference