Piccolo.NET

PCamera.AnimateViewToCenterBounds Method 

Animate the camera's view from its current matrix when the activity starts to a new matrix that centers the given bounds in the camera layers' coordinate system into the camera's view bounds.

public virtual PTransformActivity AnimateViewToCenterBounds(
   RectangleF centerBounds,
   bool shouldScaleToFit,
   long duration
);

Parameters

centerBounds
The bounds to center the view on.
shouldScaleToFit
Indicates whether the camera should scale it's view when necessary to fully fit the given bounds within the camera's view bounds.
duration
The amount of time that the animation should take.

Return Value

The newly scheduled activity, if the duration is greater than 0; else null.

Remarks

If the duration is 0 then the view will be transformed immediately, and null will be returned. Else a new PTransformActivity will get returned that is set to animate the camera’s view matrix to the new bounds. If shouldScaleToFit is true, then the camera will also scale its view so that the given bounds fit fully within the camera's view bounds, else the camera will maintain its original scale.

See Also

PCamera Class | UMD.HCIL.Piccolo Namespace


Web Accessibility