SadConsole.CellAppearance.CopyAppearanceTo C# (CSharp) Method

CopyAppearanceTo() public method

Applies this appearance instance values to the destination appearance.
public CopyAppearanceTo ( ICellAppearance destination ) : void
destination ICellAppearance The target of the appearance copy.
return void
        public void CopyAppearanceTo(ICellAppearance destination)
        {
            destination.Foreground = this.Foreground;
            destination.Background = this.Background;
            destination.SpriteEffect = this.SpriteEffect;

            if (this.GlyphIndex != -1)
                destination.GlyphIndex = this.GlyphIndex;
        }

Usage Example

Beispiel #1
0
        public void RefreshTool()
        {
            lineStyle = new CellAppearance(CharacterPickPanel.SharedInstance.SettingForeground,
                                              CharacterPickPanel.SharedInstance.SettingBackground,
                                              CharacterPickPanel.SharedInstance.SettingCharacter,
                                              CharacterPickPanel.SharedInstance.SettingMirrorEffect);

            lineStyle.CopyAppearanceTo(lineCell);
        }