Rotate Transform

6 views
Skip to first unread message

Irati

unread,
Feb 11, 2010, 10:41:24 AM2/11/10
to Degrafa
Hi!!

I'm would like to know if there is any way to get the new position
data, or something like that of a rotated rectangle. I'm using a
Regularrectangle and a Rotate Transform to do the rotation around
other shape or point. What I would like it to get the new position of
the rectangle.

Do you know how to get that coordinates?

Thanks!!

Irati

Irati

unread,
Feb 12, 2010, 5:51:37 AM2/12/10
to Degrafa
If thi is not possible, I would like to know if there is any chance to
apply a rotation to a rectangle, and then apply a different one to
that other.

Jason Hawryluk (Degrafa)

unread,
Feb 12, 2010, 8:24:46 AM2/12/10
to deg...@googlegroups.com

Try myrect.transformBounds to get the rect after the transformation.

cheers


-----Message d'origine-----
De : deg...@googlegroups.com [mailto:deg...@googlegroups.com]De la
part de Irati
Envoy� : vendredi 12 f�vrier 2010 11:52
� : Degrafa
Objet : [Degrafa:1287] Re: Rotate Transform

--
You received this message because you are subscribed to the Google Groups
"Degrafa" group.
To post to this group, send email to deg...@googlegroups.com.
To unsubscribe from this group, send email to
degrafa+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/degrafa?hl=en.

Irati

unread,
Feb 12, 2010, 9:35:51 AM2/12/10
to Degrafa
Hi Jason,

First of all thank you for the answer.

I have tried this and when I do trace(myrect.transformBounds.x + ","
+ myrect.transformBounds,y); after the transformation and the result
is (0,0). I get the same doing trace(myrect.bounds.x + "," +
myrect.bounds,y); .Maybe it is because I am using actionscript to do
this and I am setting the data wrong. Anyways, the visualization of
the transformed rectangle is OK.

I'm quite new with this technology and maybe I am doing something
wrong. I am doing this to rotate the rectangle:

rotate.centerX = point.x;
rotate.centerY = point.y;
rotate.angle = angle;
myrect.transform = rotate;
trace("after the transform:" + myrect.transformBounds.x
+","+myrect.transform.y);

Anyways if there is any way to concat two rotateTransforms it would be
enough, but I can not find any example of that.


Cheers


On 12 feb, 14:24, "Jason Hawryluk \(Degrafa\)" <ja...@degrafa.com>
wrote:

Reply all
Reply to author
Forward
0 new messages