-Rotating image

I used the Matrix class to rotate the image. The rotation works very well, but if I try to scroll, hide the image. How to solve this problem? How do I rotate a large 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;

Regards, Mykhaylo

0


source to share


3 answers


In my experience, this code works depending on how the image was previously set and positioned, and what you do after rotation. What I do after rotating is modifying the tx and ty matrix to move the image, which is actually outside the viewport.



+1


source


Why not use the wImage.rotation property?



0


source


The kind of solution for image rotation does not matter. My problem: after scrolling the image - hide the image.

0


source







All Articles