setTransform method
Utility function that calculates directly the transformation for a DisplayObject.
Implementation
GMatrix setTransform(
double x,
double y,
double pivotX,
double pivotY,
double scaleX,
double scaleY,
double skewX,
double skewY,
double rotation,
) {
a = math.cos(rotation + skewY) * scaleX;
b = math.sin(rotation + skewY) * scaleX;
c = -math.sin(rotation - skewX) * scaleY;
d = math.cos(rotation - skewX) * scaleY;
tx = x - ((pivotX * a) + (pivotY * c));
ty = y - ((pivotX * b) + (pivotY * d));
return this;
}