C# Класс Nez.NezSpriteFont

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

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

Метод Описание
IFont ( Batcher batcher, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
IFont ( Batcher batcher, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
NezSpriteFont ( SpriteFont font ) : System
drawInto ( Batcher batcher, FontCharacterSource &text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
hasCharacter ( char c ) : bool

checks to see if a BitmapFontRegion exists for the char

measureString ( StringBuilder text ) : Vector2

Returns the size of the contents of a StringBuilder when rendered in this font.

measureString ( string text ) : Vector2

Returns the size of a string when rendered in this font.

measureString ( FontCharacterSource &text, Vector2 &size ) : void
tryGetFontRegionForChar ( char c, SpriteFont &fontGlyph, bool useDefaultRegionIfNotPresent = false ) : bool

gets the BitmapFontRegion for the given char optionally substituting the default region if it isnt present.

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

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

public IFont ( Batcher batcher, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
batcher Batcher
text StringBuilder
position Vector2
color Color
rotation float
origin Vector2
scale Vector2
effect SpriteEffects
depth float
Результат void

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

public IFont ( Batcher batcher, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
batcher Batcher
text string
position Vector2
color Color
rotation float
origin Vector2
scale Vector2
effect SpriteEffects
depth float
Результат void

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

public NezSpriteFont ( SpriteFont font ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
Результат System

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

public drawInto ( Batcher batcher, FontCharacterSource &text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth ) : void
batcher Batcher
text FontCharacterSource
position Vector2
color Color
rotation float
origin Vector2
scale Vector2
effect SpriteEffects
depth float
Результат void

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

checks to see if a BitmapFontRegion exists for the char
public hasCharacter ( char c ) : bool
c char C.
Результат bool

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

Returns the size of the contents of a StringBuilder when rendered in this font.
public measureString ( StringBuilder text ) : Vector2
text StringBuilder The text to measure.
Результат Vector2

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

Returns the size of a string when rendered in this font.
public measureString ( string text ) : Vector2
text string The text to measure.
Результат Vector2

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

public measureString ( FontCharacterSource &text, Vector2 &size ) : void
text FontCharacterSource
size Vector2
Результат void

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

gets the BitmapFontRegion for the given char optionally substituting the default region if it isnt present.
public tryGetFontRegionForChar ( char c, SpriteFont &fontGlyph, bool useDefaultRegionIfNotPresent = false ) : bool
c char C.
fontGlyph Microsoft.Xna.Framework.Graphics.SpriteFont
useDefaultRegionIfNotPresent bool If set to true use default region if not present.
Результат bool