C# 클래스 SadConsole.Consoles.TextSurfaceExtensions

Extension methods relating to all text surface types.
파일 보기 프로젝트 열기: Thraka/SadConsole

공개 메소드들

메소드 설명
Copy ( this source, ITextSurface destination ) : void

Copies the contents of the cell surface to the destination.

If the sizes to not match, it will always start at 0,0 and work with what it can and move on to the next row when either surface runs out of columns being processed

Copy ( this source, ITextSurface destination, int x, int y ) : void

Copies the contents of the cell surface to the destination at the specified x,y.

Copy ( this source, int x, int y, int width, int height, ITextSurface destination, int destinationX, int destinationY ) : void

Copies the contents of this cell surface at the specified x,y coordinates to the destination, only with the specified width and height, and copies it to the specified destinationX and destinationY position.

GetCell ( this surface, int x, int y ) : Cell

Gets a cell based on it's coordinates on the surface.

GetIndexFromPoint ( this surface, Point location ) : int

Gets the index of a location on the surface by point.

GetIndexFromPoint ( this surface, int x, int y ) : int

Gets the index of a location on the surface by coordinate.

GetPointFromIndex ( this surface, int index ) : Point

Gets the x,y of an index on the surface.

IsValidCell ( this surface, int x, int y ) : bool

Tests if a cell is valid based on its x,y position.

IsValidCell ( this surface, int x, int y, int &index ) : bool

Tests if a cell is valid based on its x,y position.

메소드 상세

Copy() 공개 정적인 메소드

Copies the contents of the cell surface to the destination.
If the sizes to not match, it will always start at 0,0 and work with what it can and move on to the next row when either surface runs out of columns being processed
public static Copy ( this source, ITextSurface destination ) : void
source this The source surface
destination ITextSurface The destination surface.
리턴 void

Copy() 공개 정적인 메소드

Copies the contents of the cell surface to the destination at the specified x,y.
public static Copy ( this source, ITextSurface destination, int x, int y ) : void
source this The source surface
destination ITextSurface The destination surface.
x int The x coordinate of the destination.
y int The y coordinate of the destination.
리턴 void

Copy() 공개 정적인 메소드

Copies the contents of this cell surface at the specified x,y coordinates to the destination, only with the specified width and height, and copies it to the specified destinationX and destinationY position.
public static Copy ( this source, int x, int y, int width, int height, ITextSurface destination, int destinationX, int destinationY ) : void
source this The source surface
x int The x coordinate to start from.
y int The y coordinate to start from.
width int The width to copy from.
height int The height to copy from.
destination ITextSurface The destination surface.
destinationX int The x coordinate to copy to.
destinationY int The y coordinate to copy to.
리턴 void

GetCell() 공개 정적인 메소드

Gets a cell based on it's coordinates on the surface.
public static GetCell ( this surface, int x, int y ) : Cell
surface this The surface to check.
x int The X coordinate.
y int The Y coordinate.
리턴 Cell

GetIndexFromPoint() 공개 정적인 메소드

Gets the index of a location on the surface by point.
public static GetIndexFromPoint ( this surface, Point location ) : int
surface this The surface to check.
location Microsoft.Xna.Framework.Point The location of the index to get.
리턴 int

GetIndexFromPoint() 공개 정적인 메소드

Gets the index of a location on the surface by coordinate.
public static GetIndexFromPoint ( this surface, int x, int y ) : int
surface this The surface to check.
x int The x of the location.
y int The y of the location.
리턴 int

GetPointFromIndex() 공개 정적인 메소드

Gets the x,y of an index on the surface.
public static GetPointFromIndex ( this surface, int index ) : Point
surface this The surface to check.
index int The index to get.
리턴 Microsoft.Xna.Framework.Point

IsValidCell() 공개 정적인 메소드

Tests if a cell is valid based on its x,y position.
public static IsValidCell ( this surface, int x, int y ) : bool
surface this The surface to check.
x int The x coordinate of the cell to test.
y int The y coordinate of the cell to test.
리턴 bool

IsValidCell() 공개 정적인 메소드

Tests if a cell is valid based on its x,y position.
public static IsValidCell ( this surface, int x, int y, int &index ) : bool
surface this The surface to check.
x int The x coordinate of the cell to test.
y int The y coordinate of the cell to test.
index int If the cell is valid, the index of the cell when found.
리턴 bool