hello ruterer007

I know that I can rotate any display object by using the transform
matrix. But after the rotation, the bounder of the object is not the
orignal one. I want to draw a border around the rotated object.

For example. I rotate a button for 30 degrees. Then I want to draw a
border to the button. The border should also a 30 degrees rotated
rectangle.

Thanks

--- In [email protected], "rueter007" <[EMAIL PROTECTED]> wrote:
>
> you can rotate an object around any arbitrary point using matrix
> transformations.
> 
>       public static function rotateAroundInternalPoint(m:Matrix, x:Number,
> y:Number, angleDegrees:Number):void
>       {
>               var point:Point = new Point(x, y);
>               point = m.transformPoint(point);
>               m.tx -= point.x;
>               m.ty -= point.y;
>               m.rotate(angleDegrees*(Math.PI/180));
>               m.tx += point.x;
>               m.ty += point.y;
>       }
> 
> you can then apply the matrix on the component transform.
> 
> --- In [email protected], "Larry Zhang" <larryzzl.flex@>
> wrote:
> >
> > Hello all
> > 
> >           I find if I rotate the image (by setting the rotation to
some
> > value in Image property) to some degree, the axis of the object
has been
> > changed. So if I want to draw a rect around the image object, how
> can I do
> > it. 
> > 
> >           And, I find if I setting rotation of an object will
cause the
> > object been rotated from it's (0, 0) point. How can I rotate it
> around some
> > other point, such as the center of the image? 
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > ==============================
> > 
> > Make Every Day Count
> > 
> >  
> > 
> > Larry Zhang
> >
>


Reply via email to