diff --git a/src/as/com/threerings/flash/DisplayUtil.as b/src/as/com/threerings/flash/DisplayUtil.as index 32e3c181..0be02573 100644 --- a/src/as/com/threerings/flash/DisplayUtil.as +++ b/src/as/com/threerings/flash/DisplayUtil.as @@ -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. */