C# Класс RenderingLibrary.Graphics.BitmapFont

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AssignCharacterTextureCoordinates ( int asciiNumber, float &tVTop, float &tVBottom, float &tULeft, float &tURight ) : void
BitmapFont ( Microsoft.Xna.Framework.Graphics.Texture2D fontTextureGraphic, string fontPattern ) : System
BitmapFont ( string fontFile, SystemManagers managers ) : System
BitmapFont ( string textureFile, string fontFile, SystemManagers managers ) : System
Dispose ( ) : void
DistanceFromTopOfLine ( int asciiNumber ) : float
GetCharacterHeight ( int asciiNumber ) : float
GetCharacterInfo ( char character ) : BitmapCharacterInfo
GetCharacterInfo ( int asciiNumber ) : BitmapCharacterInfo
GetCharacterRect ( char c, int lineNumber, Point &point, Rectangle &destinationRectangle, int &pageIndex, float fontScale = 1 ) : Rectangle
GetCharacterScaleX ( int asciiNumber ) : float
GetCharacterSpacing ( int asciiNumber ) : float
GetCharacterWidth ( char character ) : float
GetCharacterWidth ( int asciiNumber ) : float
GetCharacterXOffset ( int asciiNumber ) : float
GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
GetSourceTextures ( string fontPattern ) : string[]
MeasureString ( string line ) : int
RenderAtlasedTextureToScreen ( List lines, HorizontalAlignment horizontalAlignment, float textureToRenderHeight, Color color, float rotation, float fontScale, SystemManagers managers, SpriteRenderer spriteRenderer, object objectRequestingChange ) : void

Used for rendering directly to screen with an atlased texture.

RenderToTexture2D ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D ( string whatToRender, HorizontalAlignment horizontalAlignment, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
RenderToTexture2D ( string whatToRender, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
SetFontPattern ( string fontPattern ) : void
SetFontPatternFromFile ( string fntFileName ) : void

Приватные методы

Метод Описание
CheckForLoadedAtlasTexture ( string filename ) : AtlasedTexture
DrawLines ( IEnumerable lines, HorizontalAlignment horizontalAlignment, object objectRequestingChange, int requiredWidth, List widths, SpriteRenderer spriteRenderer ) : Point
FillBitmapCharacterInfo ( int characterID, string fontString, int textureWidth, int textureHeight, int lineHeightInPixels, int startingIndex ) : BitmapCharacterInfo
GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight, List &widths ) : void
RenderToTexture2DUsingImageData ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers ) : Microsoft.Xna.Framework.Graphics.Texture2D
RenderToTexture2DUsingRenderStates ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingChange ) : Microsoft.Xna.Framework.Graphics.Texture2D

Описание методов

AssignCharacterTextureCoordinates() публичный Метод

public AssignCharacterTextureCoordinates ( int asciiNumber, float &tVTop, float &tVBottom, float &tULeft, float &tURight ) : void
asciiNumber int
tVTop float
tVBottom float
tULeft float
tURight float
Результат void

BitmapFont() публичный Метод

public BitmapFont ( Microsoft.Xna.Framework.Graphics.Texture2D fontTextureGraphic, string fontPattern ) : System
fontTextureGraphic Microsoft.Xna.Framework.Graphics.Texture2D
fontPattern string
Результат System

BitmapFont() публичный Метод

public BitmapFont ( string fontFile, SystemManagers managers ) : System
fontFile string
managers SystemManagers
Результат System

BitmapFont() публичный Метод

public BitmapFont ( string textureFile, string fontFile, SystemManagers managers ) : System
textureFile string
fontFile string
managers SystemManagers
Результат System

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DistanceFromTopOfLine() публичный Метод

public DistanceFromTopOfLine ( int asciiNumber ) : float
asciiNumber int
Результат float

GetCharacterHeight() публичный Метод

public GetCharacterHeight ( int asciiNumber ) : float
asciiNumber int
Результат float

GetCharacterInfo() публичный Метод

public GetCharacterInfo ( char character ) : BitmapCharacterInfo
character char
Результат BitmapCharacterInfo

GetCharacterInfo() публичный Метод

public GetCharacterInfo ( int asciiNumber ) : BitmapCharacterInfo
asciiNumber int
Результат BitmapCharacterInfo

GetCharacterRect() публичный Метод

public GetCharacterRect ( char c, int lineNumber, Point &point, Rectangle &destinationRectangle, int &pageIndex, float fontScale = 1 ) : Rectangle
c char
lineNumber int
point Point
destinationRectangle Microsoft.Xna.Framework.Rectangle
pageIndex int
fontScale float
Результат Microsoft.Xna.Framework.Rectangle

GetCharacterScaleX() публичный Метод

public GetCharacterScaleX ( int asciiNumber ) : float
asciiNumber int
Результат float

GetCharacterSpacing() публичный Метод

public GetCharacterSpacing ( int asciiNumber ) : float
asciiNumber int
Результат float

GetCharacterWidth() публичный Метод

public GetCharacterWidth ( char character ) : float
character char
Результат float

GetCharacterWidth() публичный Метод

public GetCharacterWidth ( int asciiNumber ) : float
asciiNumber int
Результат float

GetCharacterXOffset() публичный Метод

public GetCharacterXOffset ( int asciiNumber ) : float
asciiNumber int
Результат float

GetRequiredWithAndHeight() публичный Метод

public GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
lines IEnumerable
requiredWidth int
requiredHeight int
Результат void

GetSourceTextures() публичный статический Метод

public static GetSourceTextures ( string fontPattern ) : string[]
fontPattern string
Результат string[]

MeasureString() публичный Метод

public MeasureString ( string line ) : int
line string
Результат int

RenderAtlasedTextureToScreen() публичный Метод

Used for rendering directly to screen with an atlased texture.
public RenderAtlasedTextureToScreen ( List lines, HorizontalAlignment horizontalAlignment, float textureToRenderHeight, Color color, float rotation, float fontScale, SystemManagers managers, SpriteRenderer spriteRenderer, object objectRequestingChange ) : void
lines List
horizontalAlignment HorizontalAlignment
textureToRenderHeight float
color Color
rotation float
fontScale float
managers SystemManagers
spriteRenderer SpriteRenderer
objectRequestingChange object
Результат void

RenderToTexture2D() публичный Метод

public RenderToTexture2D ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
lines IEnumerable
horizontalAlignment HorizontalAlignment
managers SystemManagers
toReplace Microsoft.Xna.Framework.Graphics.Texture2D
objectRequestingRender object
Результат Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D() публичный Метод

public RenderToTexture2D ( string whatToRender, HorizontalAlignment horizontalAlignment, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
whatToRender string
horizontalAlignment HorizontalAlignment
managers SystemManagers
objectRequestingRender object
Результат Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D() публичный Метод

public RenderToTexture2D ( string whatToRender, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
whatToRender string
managers SystemManagers
objectRequestingRender object
Результат Microsoft.Xna.Framework.Graphics.Texture2D

SetFontPattern() публичный Метод

public SetFontPattern ( string fontPattern ) : void
fontPattern string
Результат void

SetFontPatternFromFile() публичный Метод

public SetFontPatternFromFile ( string fntFileName ) : void
fntFileName string
Результат void