Class: Transform

Kinetic. Transform

new Transform(m)

Transform constructor

Parameters:
Name Type Argument Description
m Array <optional>

Optional 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(point) → {Object}

Transform point

Parameters:
Name Type Description
point Object

2D 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
KineticJS Copyright © 2015 The contributors to the KineticJS project.
Documentation generated by JSDoc 3.2.2 on Tue Jan 20th 2015 using the DocStrap template.