C# Class SadConsole.Consoles.TextSurfaceView

Inheritance: ITextSurfaceRendered
Mostrar archivo Open project: Thraka/SadConsole Class Usage Examples

Protected Properties

Property Type Description
cells Cell[]
renderArea Microsoft.Xna.Framework.Rectangle
renderRects Microsoft.Xna.Framework.Rectangle[]

Private Properties

Property Type Description

Public Methods

Method Description
Hydrate ( ITextSurfaceRendered surface ) : void

Call after the TextSurfaceView is deserialized to hook it back up to the original surface.

Hydrate ( ITextSurfaceRendered surface, Rectangle view ) : void

Call after the TextSurfaceView is deserialized to hook it back up to the original surface.

Load ( string file, ITextSurfaceRendered surfaceHydrate ) : TextSurfaceView

Loads a TextSurfaceView from a file and existing ITextSurfaceRendered.

Save ( string file ) : void

Saves the serialized TextSurfaceView to a file.

TextSurfaceView ( ITextSurfaceRendered surface, Rectangle area ) : System

Creates a new surface view from an existing surface.

this ( int index ) : Cell

Gets a cell by index.

this ( int x, int y ) : Cell

Gets a cell based on its coordinates on the surface.

Protected Methods

Method Description
ResetArea ( ) : void

Keeps the text view data in sync with this surface.

Method Details

Hydrate() public method

Call after the TextSurfaceView is deserialized to hook it back up to the original surface.
public Hydrate ( ITextSurfaceRendered surface ) : void
surface ITextSurfaceRendered The surface to associate with the view.
return void

Hydrate() public method

Call after the TextSurfaceView is deserialized to hook it back up to the original surface.
public Hydrate ( ITextSurfaceRendered surface, Rectangle view ) : void
surface ITextSurfaceRendered The surface to associate with the view.
view Microsoft.Xna.Framework.Rectangle The sub view of the .
return void

Load() public static method

Loads a TextSurfaceView from a file and existing ITextSurfaceRendered.
public static Load ( string file, ITextSurfaceRendered surfaceHydrate ) : TextSurfaceView
file string The source file.
surfaceHydrate ITextSurfaceRendered The surface this view was originally from.
return TextSurfaceView

ResetArea() protected method

Keeps the text view data in sync with this surface.
protected ResetArea ( ) : void
return void

Save() public method

Saves the serialized TextSurfaceView to a file.
public Save ( string file ) : void
file string The destination file.
return void

TextSurfaceView() public method

Creates a new surface view from an existing surface.
public TextSurfaceView ( ITextSurfaceRendered surface, Rectangle area ) : System
surface ITextSurfaceRendered The source cell data.
area Microsoft.Xna.Framework.Rectangle The area of the text surface.
return System

this() public method

Gets a cell by index.
public this ( int index ) : Cell
index int The index of the cell.
return Cell

this() public method

Gets a cell based on its coordinates on the surface.
public this ( int x, int y ) : Cell
x int The X coordinate.
y int The Y coordinate.
return Cell

Property Details

cells protected_oe property

protected Cell[] cells
return Cell[]

renderArea protected_oe property

protected Rectangle,Microsoft.Xna.Framework renderArea
return Microsoft.Xna.Framework.Rectangle

renderRects protected_oe property

protected Rectangle[],Microsoft.Xna.Framework renderRects
return Microsoft.Xna.Framework.Rectangle[]