Titanium.UI.2DMatrix

Object of Titanium.UI.
Platform Since
Android 0.9
iPhone 0.9
iPad 0.9

Summary

The 2D Matrix is an object for holding values for an affine transformation matrix.

Description

The 2DMatrix is created by Titanium.UI.create2DMatrix. A 2D matrix is used to rotate, scale, translate, or skew the objects in a two-dimensional space. A 2D matrix is represented by a 3 by 3 matrix. Because the third column is always (0,0,1), the data structure contains values for only the first two columns. You create an identity matrix by creating a 2D Matrix with an empty constructor.

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

fireEvent

Fires a synthesized event to any registered listeners.

invert

Returns a matrix constructed by inverting an existing matrix

multiply

Returns a matrix constructed by combining two existing matrix.

removeEventListener

Removes the specified callback as an event listener for the named event.

rotate

Returns a matrix constructed by rotating an existing matrix

scale

Returns a matrix constructed by scaling an existing matrix

translate

Returns a matrix constructed by translating an existing matrix

Properties

Name Type Summary
a Number

The entry at position [1,1] in the matrix. (iPhone, iPad only.)

b Number

The entry at position [1,2] in the matrix. (iPhone, iPad only.)

c Number

The entry at position [2,1] in the matrix. (iPhone, iPad only.)

d Number

The entry at position [2,2] in the matrix. (iPhone, iPad only.)

tx Number

The entry at position [3,1] in the matrix. (iPhone, iPad only.)

ty Number

The entry at position [3,2] in the matrix. (iPhone, iPad only.)

Events

This type has no events.