/// <summary> /// Adds sticky bounds handles (with respect to the given camera) to the specified node. /// </summary> /// <param name="aNode">The node to add sticky bounds handles to.</param> /// <param name="camera">The camera to stick the bounds handles to.</param> /// <remarks> /// Sticky bounds handles are not affected by the view transform of the camera. That /// is, they will remain a constant size as the view is zoomed in and out. /// </remarks> public static void AddStickyBoundsHandlesTo(PNode aNode, PCamera camera) { camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateEastLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateWestLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthEastLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthWestLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthEastLocator(aNode))); camera.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthWestLocator(aNode))); }
/// <summary> /// Adds bounds handles to the given node. /// </summary> /// <param name="aNode">The node to add bounds handles to.</param> public static void AddBoundsHandlesTo(PNode aNode) { aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateEastLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateWestLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthEastLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthWestLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthEastLocator(aNode))); aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthWestLocator(aNode))); }