WinForm Animation Library
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
WinFormAnimation.Animator2D Class Reference

The two dimensional animator class, useful for animating values created from two underlying values More...

Inheritance diagram for WinFormAnimation.Animator2D:
WinFormAnimation.IAnimator

Public Types

enum  KnownProperties { KnownProperties.Size, KnownProperties.Location }
 The known two dimensional properties of WinForm controls More...
 

Public Member Functions

 Animator2D ()
 Initializes a new instance of the Animator2D class. More...
 
 Animator2D (FPSLimiterKnownValues fpsLimiter)
 Initializes a new instance of the Animator2D class. More...
 
 Animator2D (Path2D path)
 Initializes a new instance of the Animator2D class. More...
 
 Animator2D (Path2D path, FPSLimiterKnownValues fpsLimiter)
 Initializes a new instance of the Animator2D class. More...
 
 Animator2D (Path2D[] paths)
 Initializes a new instance of the Animator2D class. More...
 
 Animator2D (Path2D[] paths, FPSLimiterKnownValues fpsLimiter)
 Initializes a new instance of the Animator2D class. More...
 
virtual void Pause ()
 Pause the animation More...
 
virtual void Play (object targetObject, string propertyName)
 Starts the playing of the animation More...
 
virtual void Play (object targetObject, string propertyName, SafeInvoker endCallback)
 Starts the playing of the animation More...
 
virtual void Play< T > (T targetObject, Expression< Func< T, object >> propertySetter)
 Starts the playing of the animation More...
 
virtual void Play< T > (T targetObject, Expression< Func< T, object >> propertySetter, SafeInvoker endCallback)
 Starts the playing of the animation More...
 
virtual void Resume ()
 Resume the animation from where it paused More...
 
virtual void Stop ()
 Stops the animation and resets its status, resume is no longer possible More...
 
void Play (object targetObject, KnownProperties property)
 Starts the playing of the animation More...
 
void Play (object targetObject, KnownProperties property, SafeInvoker endCallback)
 Starts the playing of the animation More...
 
void Play (SafeInvoker< Float2D > frameCallback)
 Starts the playing of the animation More...
 
void Play (SafeInvoker< Float2D > frameCallback, SafeInvoker endCallback)
 Starts the playing of the animation More...
 

Public Attributes

Path2D ActivePath => new Path2D(HorizontalAnimator.ActivePath, VerticalAnimator.ActivePath)
 Gets the currently active path. More...
 

Protected Attributes

SafeInvoker EndCallback
 The callback to get invoked at the end of the animation More...
 
SafeInvoker< Float2DFrameCallback
 The callback to get invoked at each frame More...
 
bool IsEnded
 A boolean value indicating if the EndInvoker already invoked More...
 
object TargetObject
 The target object to change the property of More...
 
float XValue
 The latest horizontal value More...
 
float YValue
 The latest vertical value More...
 

Properties

Animator HorizontalAnimator [get, protected set]
 Gets the horizontal animator. More...
 
Animator VerticalAnimator [get, protected set]
 Gets the vertical animator. More...
 
Path2D[] Paths [get, set]
 Gets or sets an array containing the list of paths of the animation More...
 
virtual bool Repeat [get, set]
 Gets or sets a value indicating whether animator should repeat the animation after its ending More...
 
virtual bool ReverseRepeat [get, set]
 Gets or sets a value indicating whether animator should repeat the animation in reverse after its ending. More...
 
virtual AnimatorStatus CurrentStatus [get]
 Gets the current status of the animation More...
 
- Properties inherited from WinFormAnimation.IAnimator
AnimatorStatus CurrentStatus [get]
 Gets the current status of the animation More...
 
bool Repeat [get, set]
 Gets or sets a value indicating whether animator should repeat the animation after its ending More...
 
bool ReverseRepeat [get, set]
 Gets or sets a value indicating whether animator should repeat the animation in reverse after its ending. More...
 

Detailed Description

The two dimensional animator class, useful for animating values created from two underlying values

Definition at line 12 of file Animator2D.cs.

Member Enumeration Documentation

The known two dimensional properties of WinForm controls

Enumerator
Size 

The property named 'Size' of the object

Location 

The property named 'Location' of the object

Definition at line 17 of file Animator2D.cs.

Constructor & Destructor Documentation

WinFormAnimation.Animator2D.Animator2D ( )

Initializes a new instance of the Animator2D class.

Definition at line 67 of file Animator2D.cs.

WinFormAnimation.Animator2D.Animator2D ( FPSLimiterKnownValues  fpsLimiter)

Initializes a new instance of the Animator2D class.

Parameters
fpsLimiterLimits the maximum frames per seconds

Definition at line 78 of file Animator2D.cs.

WinFormAnimation.Animator2D.Animator2D ( Path2D  path)

Initializes a new instance of the Animator2D class.

Parameters
pathThe path of the animation

Definition at line 89 of file Animator2D.cs.

WinFormAnimation.Animator2D.Animator2D ( Path2D  path,
FPSLimiterKnownValues  fpsLimiter 
)

Initializes a new instance of the Animator2D class.

Parameters
pathThe path of the animation
fpsLimiterLimits the maximum frames per seconds

Definition at line 103 of file Animator2D.cs.

WinFormAnimation.Animator2D.Animator2D ( Path2D[]  paths)

Initializes a new instance of the Animator2D class.

Parameters
pathsAn array containing the list of paths of the animation

Definition at line 115 of file Animator2D.cs.

WinFormAnimation.Animator2D.Animator2D ( Path2D[]  paths,
FPSLimiterKnownValues  fpsLimiter 
)

Initializes a new instance of the Animator2D class.

Parameters
pathsAn array containing the list of paths of the animation
fpsLimiterLimits the maximum frames per seconds

Definition at line 128 of file Animator2D.cs.

Member Function Documentation

virtual void WinFormAnimation.Animator2D.Pause ( )
virtual

Pause the animation

Implements WinFormAnimation.IAnimator.

Definition at line 232 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Play ( object  targetObject,
string  propertyName 
)
virtual

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertyNameThe name of the property to change

Implements WinFormAnimation.IAnimator.

Definition at line 250 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Play ( object  targetObject,
string  propertyName,
SafeInvoker  endCallback 
)
virtual

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertyNameThe name of the property to change
endCallbackThe callback to get invoked at the end of the animation

Implements WinFormAnimation.IAnimator.

Definition at line 267 of file Animator2D.cs.

void WinFormAnimation.Animator2D.Play ( object  targetObject,
KnownProperties  property 
)

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertyThe property to change

Definition at line 370 of file Animator2D.cs.

void WinFormAnimation.Animator2D.Play ( object  targetObject,
KnownProperties  property,
SafeInvoker  endCallback 
)

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertyThe property to change
endCallbackThe callback to get invoked at the end of the animation

Definition at line 388 of file Animator2D.cs.

void WinFormAnimation.Animator2D.Play ( SafeInvoker< Float2D frameCallback)

Starts the playing of the animation

Parameters
frameCallbackThe callback to get invoked at each frame

Definition at line 399 of file Animator2D.cs.

void WinFormAnimation.Animator2D.Play ( SafeInvoker< Float2D frameCallback,
SafeInvoker  endCallback 
)

Starts the playing of the animation

Parameters
frameCallbackThe callback to get invoked at each frame
endCallbackThe callback to get invoked at the end of the animation

Definition at line 413 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Play< T > ( targetObject,
Expression< Func< T, object >>  propertySetter 
)
virtual

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertySetterThe expression that represents the property of the target object
Template Parameters
TAny object containing a property

Implements WinFormAnimation.IAnimator.

Definition at line 297 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Play< T > ( targetObject,
Expression< Func< T, object >>  propertySetter,
SafeInvoker  endCallback 
)
virtual

Starts the playing of the animation

Parameters
targetObjectThe target object to change the property
propertySetterThe expression that represents the property of the target object
endCallbackThe callback to get invoked at the end of the animation
Template Parameters
TAny object containing a property

Implements WinFormAnimation.IAnimator.

Definition at line 317 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Resume ( )
virtual

Resume the animation from where it paused

Implements WinFormAnimation.IAnimator.

Definition at line 342 of file Animator2D.cs.

virtual void WinFormAnimation.Animator2D.Stop ( )
virtual

Stops the animation and resets its status, resume is no longer possible

Implements WinFormAnimation.IAnimator.

Definition at line 354 of file Animator2D.cs.

Member Data Documentation

Path2D WinFormAnimation.Animator2D.ActivePath => new Path2D(HorizontalAnimator.ActivePath, VerticalAnimator.ActivePath)

Gets the currently active path.

Definition at line 138 of file Animator2D.cs.

SafeInvoker WinFormAnimation.Animator2D.EndCallback
protected

The callback to get invoked at the end of the animation

Definition at line 36 of file Animator2D.cs.

SafeInvoker<Float2D> WinFormAnimation.Animator2D.FrameCallback
protected

The callback to get invoked at each frame

Definition at line 41 of file Animator2D.cs.

bool WinFormAnimation.Animator2D.IsEnded
protected

A boolean value indicating if the EndInvoker already invoked

Definition at line 46 of file Animator2D.cs.

object WinFormAnimation.Animator2D.TargetObject
protected

The target object to change the property of

Definition at line 51 of file Animator2D.cs.

float WinFormAnimation.Animator2D.XValue
protected

The latest horizontal value

Definition at line 56 of file Animator2D.cs.

float WinFormAnimation.Animator2D.YValue
protected

The latest vertical value

Definition at line 61 of file Animator2D.cs.

Property Documentation

virtual AnimatorStatus WinFormAnimation.Animator2D.CurrentStatus
get

Gets the current status of the animation

Definition at line 204 of file Animator2D.cs.

Animator WinFormAnimation.Animator2D.HorizontalAnimator
getprotected set

Gets the horizontal animator.

Definition at line 143 of file Animator2D.cs.

Path2D [] WinFormAnimation.Animator2D.Paths
getset

Gets or sets an array containing the list of paths of the animation

Exceptions
InvalidOperationExceptionAnimation is running

Definition at line 155 of file Animator2D.cs.

virtual bool WinFormAnimation.Animator2D.Repeat
getset

Gets or sets a value indicating whether animator should repeat the animation after its ending

Definition at line 184 of file Animator2D.cs.

virtual bool WinFormAnimation.Animator2D.ReverseRepeat
getset

Gets or sets a value indicating whether animator should repeat the animation in reverse after its ending.

Definition at line 194 of file Animator2D.cs.

Animator WinFormAnimation.Animator2D.VerticalAnimator
getprotected set

Gets the vertical animator.

Definition at line 148 of file Animator2D.cs.


The documentation for this class was generated from the following file: