Michał Ziober
Michał Ziober

Reputation: 38655

-Rotating image

To image rotate I used Matrix class. Rotating work very well, but if I try scroll - image hide. How to solve this problem ? How to rotate big Image ? Flex Code[Rotate]:

var tmpMatrix:Matrix = wImage.transform.matrix;
var oHeight:Number = wImage.height / 2;
var oWidth:Number = wImage.width / 2;``
tmpMatrix.translate(-oWidth, -oHeight);
tmpMatrix.rotate(-Math.PI / 2);
tmpMatrix.translate(oWidth, oHeight);
wImage.transform.matrix = tmpMatrix;

Best regards, mykhaylo

Upvotes: 0

Views: 4627

Answers (2)

Andrea
Andrea

Reputation: 1868

From my experience, that code works depending on how is the image previously sized and positioned, and what you do after rotation. What I do after rotating is modify matrix tx and ty in order to reposition the image, which is actually out of the viewport.

Upvotes: 1

Assaf Lavie
Assaf Lavie

Reputation: 75983

Why not use the wImage.rotation property?

Upvotes: 0

Related Questions