C# 클래스 Microsoft.Xna.Framework.PointExtensions

파일 보기 프로젝트 열기: Thraka/SadConsole

공개 메소드들

메소드 설명
ConsoleLocationToWorld ( this point, int cellWidth, int cellHeight ) : Point

Translates a console cell position to where it appears on the screen in pixels.

ToIndex ( this point, int rowWidth ) : int

Translates an x,y position to an array index.

ToPositionMatrix ( this position, Point cellSize, bool absolutePositioning ) : Matrix

Creates a position matrix (in pixels) based on the position of a cell.

TranslateFont ( this point, Font sourceFont, Font targetFont ) : Point

Gets the cell coordinates of the targetFont based on a cell in the sourceFont.

WorldLocationToConsole ( this point, int cellWidth, int cellHeight ) : Point

Translates a pixel to where it appears on a console cell.

메소드 상세

ConsoleLocationToWorld() 공개 정적인 메소드

Translates a console cell position to where it appears on the screen in pixels.
public static ConsoleLocationToWorld ( this point, int cellWidth, int cellHeight ) : Point
point this The current cell position.
cellWidth int The width of a cell in pixels.
cellHeight int The height of a cell in pixels.
리턴 Point

ToIndex() 공개 정적인 메소드

Translates an x,y position to an array index.
public static ToIndex ( this point, int rowWidth ) : int
point this The position.
rowWidth int How many columns in a row.
리턴 int

ToPositionMatrix() 공개 정적인 메소드

Creates a position matrix (in pixels) based on the position of a cell.
public static ToPositionMatrix ( this position, Point cellSize, bool absolutePositioning ) : Matrix
position this The cell position.
cellSize Point The size of the cell in pixels.
absolutePositioning bool When true, indicates that the indicates pixels, not cell coordinates.
리턴 Matrix

TranslateFont() 공개 정적인 메소드

Gets the cell coordinates of the targetFont based on a cell in the sourceFont.
public static TranslateFont ( this point, Font sourceFont, Font targetFont ) : Point
point this The position of the cell in the .
sourceFont SadConsole.Font The source font translating from.
targetFont SadConsole.Font The target font translating to.
리턴 Point

WorldLocationToConsole() 공개 정적인 메소드

Translates a pixel to where it appears on a console cell.
public static WorldLocationToConsole ( this point, int cellWidth, int cellHeight ) : Point
point this The current world position.
cellWidth int The width of a cell in pixels.
cellHeight int The height of a cell in pixels.
리턴 Point