Esempio n. 1
0
 /// <summary>
 /// Copies the visual appearance to the specified cell. This includes foreground, background, glyph, and mirror effect.
 /// </summary>
 /// <param name="cell">The target cell to copy to.</param>
 public void CopyAppearanceTo(Cell cell)
 {
     cell.Foreground = Foreground;
     cell.Background = Background;
     cell.Glyph      = Glyph;
     cell.Mirror     = Mirror;
     cell.Decorators = Decorators.Length != 0 ? Decorators.ToArray() : Array.Empty <CellDecorator>();
 }
Esempio n. 2
0
 /// <summary>
 /// Copies the visual appearance to the specified cell. This includes foreground, background, glyph, and mirror effect.
 /// </summary>
 /// <param name="cell">The target cell to copy to.</param>
 public void CopyAppearanceTo(Cell cell)
 {
     cell.Foreground = this.Foreground;
     cell.Background = this.Background;
     cell.Glyph      = this.Glyph;
     cell.Mirror     = this.Mirror;
     cell.Decorators = Decorators.Length != 0 ? Decorators.ToArray() : new CellDecorator[0];
 }
Esempio n. 3
0
 /// <summary>
 /// Restores this state to the specified cell.
 /// </summary>
 public void RestoreState(ref ColoredGlyph cell)
 {
     cell.Foreground = Foreground;
     cell.Background = Background;
     cell.Mirror     = Mirror;
     cell.Glyph      = Glyph;
     cell.IsVisible  = IsVisible;
     cell.Decorators = Decorators.Length != 0 ? Decorators.ToArray() : Array.Empty <CellDecorator>();
 }
Esempio n. 4
0
 /// <summary>
 /// Returns a new cell with the same properties as this one.
 /// </summary>
 /// <returns>The new cell.</returns>
 public Cell Clone() => new Cell(Foreground, Background, Glyph, Mirror)
 {
     IsVisible = IsVisible, Decorators = Decorators.Length != 0 ? Decorators.ToArray() : Array.Empty <CellDecorator>()
 };
Esempio n. 5
0
 /// <summary>
 /// Returns a new cell with the same properties as this one.
 /// </summary>
 /// <returns>The new cell.</returns>
 public Cell Clone() => new Cell(Foreground, Background, Glyph, Mirror)
 {
     IsVisible = this.IsVisible, Decorators = Decorators.ToArray()
 };