PXTransform Class Reference
| Inherits from | NSObject |
| Declared in | PXTransform.h PXTransform.m |
Overview
Describes the local transformation of a PXDisplayObject in two-dimensional space and color space.
PXTransform also provides methods for finding the PXDisplayObject ’s transformation in global (stage) coordinate space.
The two-dimensional transformation (translation, scale, rotation and skew) of the associated PXDisplayObject can be read and set via the matrix property.
The color transformation of the associated PXDisplayObject can be read and set via the colorTransform property.
Tasks
-
matrixA matrix containing the local transformation of the PXDisplayObject associated with the given PXTransform.
property -
concatenatedMatrixThe matrix values combined with all of the PXDisplayObject ’s parents. Describes the transformation of the PXDisplayObject in global (stage) coordinates.
property -
colorTransformThe color transformation of the associated PXDisplayObject in local color space.
property -
concatenatedColorTransformThe color transform combined with all of the PXDisplayObject ’s parents.
property -
pixelBoundsA rectangle that defines the axis-aligned bounds the PXDisplayObject associated with the transform on the stage, in points.
property
Properties
colorTransform
The color transformation of the associated PXDisplayObject in local color space.
@property (nonatomic, copy) PXColorTransform *colorTransformDiscussion
Note that the colorTransform property returns a copy of itself
and creates a copy of values assigned to it. That means that the color
transformation of a PXDisplayObject can’t be set by dereferencing
transform.colorTransform. Instead a PXColorTransform object
containing the new values and must be re-assigned to the
colorTransform property.
Wrong:
// This would have no effect on the display object.
displayObject.transform.colorTransform.redMultiplier = 0.5f;
Right:
PXColorTransform *colorTransform = displayObject.transform.colorTransform;
colorTransform.redMultiplier = 0.5f;
// This would work.
displayObject.transform.colorTransform = colorTransform;
Declared In
PXTransform.hconcatenatedColorTransform
The color transform combined with all of the PXDisplayObject ’s parents.
@property (nonatomic, readonly) PXColorTransform *concatenatedColorTransformDiscussion
It essentially describes the color transformation of the PXDisplayObject in global (stage) color space.
Declared In
PXTransform.hconcatenatedMatrix
The matrix values combined with all of the PXDisplayObject ’s parents. Describes the transformation of the PXDisplayObject in global (stage) coordinates.
@property (nonatomic, readonly) PXMatrix *concatenatedMatrixDeclared In
PXTransform.hmatrix
A matrix containing the local transformation of the PXDisplayObject associated with the given PXTransform.
@property (nonatomic, copy) PXMatrix *matrixDiscussion
Note that the matrix property returns a copy of itself and
creates a copy of values assigned to it. That means that transformation of
a PXDisplayObject can’t be set by dereferencing
transform.matrix. Instead a PXMatrix object containing the new
values and must be re-assigned to the matrix property.
Wrong:
// This would have no effect.
displayObject.transform.matrix.a = 5;
Right:
PXMatrix *matrix = displayObject.transform.matrix;
matrix.a = 5;
// This would work.
displayObject.transform.matrix = matrix;
Declared In
PXTransform.hpixelBounds
A rectangle that defines the axis-aligned bounds the PXDisplayObject associated with the transform on the stage, in points.
@property (nonatomic, readonly) PXRectangle *pixelBoundsDeclared In
PXTransform.h