GH_Motion

public class GH_Motion
Provides functionality for individual rectangle animation.

Constructors

GH_Motion

#
public GH_Motion(Rectangle rec_0, Rectangle rec_1, int duration)
Constructor. Create a new stack keyframe animator.
rec_0 (Rectangle)Initial dimensions of stack element.
rec_1 (Rectangle)Final dimensions of stack element.
duration (int)The duration, in milliseconds, for the animation

GH_Motion

#
public GH_Motion(Rectangle rec_0, Rectangle rec_1, long time_0, long time_1)
Constructor. Create a new stack keyframe animator.
rec_0 (Rectangle)Initial dimensions of stack element.
rec_1 (Rectangle)Final dimensions of stack element.
time_0 (long)Time start override (in system time ticks).
time_1 (long)Time stop override (in system time ticks).

Properties

CurrentBox

#
public Rectangle CurrentBox { get; }
Gets the rectangle that describes the shape of the box at the current instant.

FinalBox

#
public Rectangle FinalBox { get; }
Gets the dimensions of the stack box at t=1

InitialBox

#
public Rectangle InitialBox { get; }
Gets the dimensions of the stack box at t=0

InMotion

#
public bool InMotion { get; }
Gets the motion state of this object.

Interpolation

#
public GH_Interpolation Interpolation { get; set; }
Gets or sets the interpolation method for blending frames.

Parameter

#
public double Parameter { get; }
Gets the normalised time frame parameter for the current instant.

t0

#
public long t0 { get; }
Gets the start time for this animation.

t1

#
public long t1 { get; }
Gets the stop time for this animation.

Methods

ResizeContainer

#
public void ResizeContainer(Rectangle region, bool fit_horizontal, bool fit_vertical)
Call this function to override the width or height without interfering with the animation.
region (Rectangle)New region.
fit_horizontal (bool)If True, all the elements will be fit to the region horizontally.
fit_vertical (bool)If True, all the elements will be fit to the region vertically.