C# Class SadConsole.Cell

Inheritance: ICellAppearance
显示文件 Open project: Thraka/SadConsole Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Cell ( ) : System.Runtime.Serialization
Copy ( Cell destination ) : void

Copies this cells information to a new cell. Preserves appearance, Actual* properties, and glyph information.

CopyAppearanceTo ( ICellAppearance destination ) : void

Applies this appearance instance values to the destination appearance.

OnCreated ( ) : void

This should be called by anything creating and configuring a cell on the console. Configure the cell (foreground, background, index etc) and then call this.

Render ( SpriteBatch batch, Point position, Point size, Font font ) : void

Draws a single cell using the specified SpriteBatch.

Render ( SpriteBatch batch, Rectangle drawingRectangle, Font font ) : void

Draws a single cell using the specified SpriteBatch.

Reset ( ) : void

Resets this cell with default values.

ToString ( ) : string

Returns a string representing the Actual* property values.

UpdateAndApplyEffect ( double elapsedTime ) : void

Updates and applies the P:SadConsole.Cell.Effect to this cell. WARNING: Do not use with TextSurface. This should only be called when the cell has a standalone effect that isn't managed by the TextSurface.

Method Details

Cell() public method

public Cell ( ) : System.Runtime.Serialization
return System.Runtime.Serialization

Copy() public method

Copies this cells information to a new cell. Preserves appearance, Actual* properties, and glyph information.
public Copy ( Cell destination ) : void
destination Cell The cell to copy to.
return void

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

OnCreated() public method

This should be called by anything creating and configuring a cell on the console. Configure the cell (foreground, background, index etc) and then call this.
public OnCreated ( ) : void
return void

Render() public method

Draws a single cell using the specified SpriteBatch.
public Render ( SpriteBatch batch, Point position, Point size, Font font ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Rendering batch.
position Microsoft.Xna.Framework.Point Pixel position on the screen to render.
size Microsoft.Xna.Framework.Point Rendering size of the cell.
font Font Font used to draw the cell.
return void

Render() public method

Draws a single cell using the specified SpriteBatch.
public Render ( SpriteBatch batch, Rectangle drawingRectangle, Font font ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Rendering batch.
drawingRectangle Microsoft.Xna.Framework.Rectangle Where on the sreen to draw the cell, in pixels.
font Font Font used to draw the cell.
return void

Reset() public method

Resets this cell with default values.
public Reset ( ) : void
return void

ToString() public method

Returns a string representing the Actual* property values.
public ToString ( ) : string
return string

UpdateAndApplyEffect() public method

Updates and applies the P:SadConsole.Cell.Effect to this cell. WARNING: Do not use with TextSurface. This should only be called when the cell has a standalone effect that isn't managed by the TextSurface.
public UpdateAndApplyEffect ( double elapsedTime ) : void
elapsedTime double
return void