/// <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>(); }
/// <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]; }
/// <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>(); }
/// <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>() };
/// <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() };