C# Class Nez.NezSpriteFont

Inheritance: IFont
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

IFont() public méthode

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
Résultat void

IFont() public méthode

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
Résultat void

NezSpriteFont() public méthode

public NezSpriteFont ( SpriteFont font ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
Résultat System

drawInto() public méthode

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
Résultat void

hasCharacter() public méthode

checks to see if a BitmapFontRegion exists for the char
public hasCharacter ( char c ) : bool
c char C.
Résultat bool

measureString() public méthode

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.
Résultat Vector2

measureString() public méthode

Returns the size of a string when rendered in this font.
public measureString ( string text ) : Vector2
text string The text to measure.
Résultat Vector2

measureString() public méthode

public measureString ( FontCharacterSource &text, Vector2 &size ) : void
text FontCharacterSource
size Vector2
Résultat void

tryGetFontRegionForChar() public méthode

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.
Résultat bool