UMD.HCIL.Piccolo.PNode.AnimateToBounds C# (CSharp) Method

AnimateToBounds() public method

Animate this node's bounds from their current location when the activity starts to the specified bounds.
If this node descends from the root then the activity will be scheduled, else the returned activity should be scheduled manually. If two different transform activities are scheduled for the same node at the same time, they will both be applied to the node, but the last one scheduled will be applied last on each frame, so it will appear to have replaced the original. Generally you will not want to do that. Note this method animates the node's bounds, but does not change the node's matrix. Use AnimateMatrixToBounds to animate the node's matrix instead.
public AnimateToBounds ( float x, float y, float width, float height, long duration ) : UMD.HCIL.Piccolo.Activities.PInterpolatingActivity
x float The x coordinate of the target bounds.
y float The y coordinate of the target bounds.
width float The width of the target bounds.
height float The height of the target bounds.
duration long The amount of time that the animation should take.
return UMD.HCIL.Piccolo.Activities.PInterpolatingActivity
		public virtual PInterpolatingActivity AnimateToBounds(float x, float y, float width, float height, long duration) {
			RectangleF dst = new RectangleF(x, y, width, height);

			if (duration == 0) {
				Bounds = dst;
				return null;
			}

			PInterpolatingActivity ta = new PNodeBoundsActivity(this, dst, duration);
			AddActivity(ta);
			return ta;
		}