Class MoveGradientDecorator
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Inheritance
Inherited Members
Namespace: RGB.NET.Presets.Decorators
Assembly: RGB.NET.Presets.dll
Syntax
public class MoveGradientDecorator : AbstractUpdateAwareDecorator, IBindable, INotifyPropertyChanged, IGradientDecorator, IDecorator
Constructors
| Edit this page View SourceMoveGradientDecorator(RGBSurface, float, bool)
Initializes a new instance of the MoveGradientDecorator class.
Declaration
public MoveGradientDecorator(RGBSurface surface, float speed = 180, bool direction = true)
Parameters
Type | Name | Description |
---|---|---|
RGBSurface | surface | The surface this decorator belongs to. |
float | speed | The speed of the movement in units per second. The meaning of units differs for the different RGB.NET.Presets.Gradients.IGradient but 360 units will always be one complete cycle: RGB.NET.Presets.Gradients.LinearGradient: 360 unit = 1 offset. RGB.NET.Presets.Gradients.RainbowGradient: 1 unit = 1 degree. |
bool | direction | The direction the RGB.NET.Presets.Gradients.IGradient is moved. True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left). |
Properties
| Edit this page View SourceDirection
Gets or sets the direction the IGradient is moved. True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left).
Declaration
public bool Direction { get; set; }
Property Value
Type | Description |
---|---|
bool |
Speed
Gets or sets the speed of the movement in units per second. The meaning of units differs for the different IGradient, but 360 units will always be one complete cycle: LinearGradient: 360 unit = 1 offset. RainbowGradient: 1 unit = 1 degree.
Declaration
public float Speed { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceUpdate(double)
Updates this AbstractUpdateAwareDecorator.
Declaration
protected override void Update(double deltaTime)
Parameters
Type | Name | Description |
---|---|---|
double | deltaTime | The elapsed time (in seconds) since the last update. |