Class: Transform

Kinetic. Transform

Constructor

new Transform(Optional)

Transform constructor
Parameters:
Name Type Description
Optional Array six-element matrix
Source:

Methods

copy() → {Kinetic.Transform}

Copy Kinetic.Transform object
Source:
Returns:
Type
Kinetic.Transform

getMatrix()

return matrix
Source:

getTranslation() → {Object}

Returns the translation
Source:
Returns:
2D point(x, y)
Type
Object

invert() → {Kinetic.Transform}

Invert the matrix
Source:
Returns:
Type
Kinetic.Transform

multiply(matrix) → {Kinetic.Transform}

Transform multiplication
Parameters:
Name Type Description
matrix Kinetic.Transform
Source:
Returns:
Type
Kinetic.Transform

point(2D) → {Object}

Transform point
Parameters:
Name Type Description
2D Object point(x, y)
Source:
Returns:
2D point(x, y)
Type
Object

rotate(rad) → {Kinetic.Transform}

Apply rotation
Parameters:
Name Type Description
rad Number Angle in radians
Source:
Returns:
Type
Kinetic.Transform

scale(sx, sy) → {Kinetic.Transform}

Apply scale
Parameters:
Name Type Description
sx Number
sy Number
Source:
Returns:
Type
Kinetic.Transform

setAbsolutePosition() → {Kinetic.Transform}

set to absolute position via translation
Author:
  • ericdrowell
Source:
Returns:
Type
Kinetic.Transform

skew(sx, sy) → {Kinetic.Transform}

Apply skew
Parameters:
Name Type Description
sx Number
sy Number
Source:
Returns:
Type
Kinetic.Transform

translate(x, y) → {Kinetic.Transform}

Apply translation
Parameters:
Name Type Description
x Number
y Number
Source:
Returns:
Type
Kinetic.Transform