Fade Class
Definition
Section titled “Definition”Fades both the background and foreground to separate colors.
[DataContract]public class Fade : CellEffectBase, ICellEffectInheritance object → CellEffectBase
Implements ICellEffect
Constructors
Section titled “Constructors”Fade()
Section titled “Fade()”Creates a new instance of the effect.
public Fade()Fields
Section titled “Fields”_calculatedValue
Section titled “_calculatedValue”A value used in lerping the fade.
protected double _calculatedValue_goingDown
Section titled “_goingDown”Indicates the fade is currently in reverse.
protected bool _goingDownProperties
Section titled “Properties”DestinationBackground
Section titled “DestinationBackground”Gets or sets the color gradient used to fade for the cell background.
[DataMember]public Gradient DestinationBackground { get; set; }DestinationForeground
Section titled “DestinationForeground”Gets or sets the color gradient used to fade for the cell background.
[DataMember]public Gradient DestinationForeground { get; set; }FadeDuration
Section titled “FadeDuration”Gets or sets how long the fade takes to complete in seconds.
[DataMember]public TimeSpan FadeDuration { get; set; }Repeat
Section titled “Repeat”Gets or sets a value to indicate that the fade effect should repeat.
[DataMember]public bool Repeat { get; set; }UseCellForeground
Section titled “UseCellForeground”Gets or sets a value to indicate that the color gradient used with the DestinationForeground should replace its first color stop with the cell’s foreground color.
[DataMember]public bool UseCellForeground { get; set; }UseCellBackground
Section titled “UseCellBackground”Gets or sets a value to indicate that the color gradient used with the DestinationBackground should replace its first color stop with the cell’s background color.
[DataMember]public bool UseCellBackground { get; set; }FadeForeground
Section titled “FadeForeground”Gets or sets a value to indicate that the fade effect should use the foreground color on the cell’s foreground.
[DataMember]public bool FadeForeground { get; set; }FadeBackground
Section titled “FadeBackground”Gets or sets a value to indicate that the fade effect should use the background color on the cell’s background.
[DataMember]public bool FadeBackground { get; set; }AutoReverse
Section titled “AutoReverse”Gets or sets a value to indicate that the fade effect should automatically reverse itself when it finishes going up the color spectrum. By setting this to true, and setting the Repeat property to true, you can create a pulse effect.
[DataMember]public bool AutoReverse { get; set; }UseCellDestinationReverse
Section titled “UseCellDestinationReverse”When UseCellForeground or UseCellBackground is set, and this is true, the last color in the fade will be set to the cell instead of the first.
[DataMember]public bool UseCellDestinationReverse { get; set; }Methods
Section titled “Methods”ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)
Section titled “ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)”Applies the state of the effect to a cell.
public override bool ApplyToCell(ColoredGlyphBase cell, ColoredGlyphBase originalState)Parameters
Section titled “Parameters”cell ColoredGlyphBase
The surface cell using this effect.
originalState ColoredGlyphBase
The state of the cell prior to the effect being applied.
Returns
Section titled “Returns”bool
true when this method modified the cell; otherwise false.
Update(TimeSpan)
Section titled “Update(TimeSpan)”Updates the state of the effect.
public override void Update(TimeSpan delta)Parameters
Section titled “Parameters”delta TimeSpan
Time since the last call to this effect.
Restart()
Section titled “Restart()”Restarts the cell effect.
public override void Restart()Clone()
Section titled “Clone()”Returns a duplicate of this effect.
public override ICellEffect Clone()Returns
Section titled “Returns”ICellEffect
A new copy of this effect.
ToString()
Section titled “ToString()”public override string ToString()