C# Класс Microsoft.Xna.Framework.PointExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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