DisplayUtil.transformPoint convenience function

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@794 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Tom Conkling
2009-03-26 18:58:08 +00:00
parent 6e123c3c8b
commit 590fef5fed
@@ -31,6 +31,15 @@ import flash.geom.Rectangle;
public class DisplayUtil
{
/**
* Transforms a point from one DisplayObject's coordinate space to another's.
*/
public static function transformPoint (p :Point, fromDisp :DisplayObject, toDisp :DisplayObject)
:Point
{
return toDisp.globalToLocal(fromDisp.localToGlobal(p));
}
/**
* Adds newChild to container, directly below another child of the container.
*/