C# Class Nez.TextRun

provides a cached run of text for super fast text drawing. Note that this is only appropriate for text that doesnt change often and doesnt move.
Afficher le fichier Open project: prime31/Nez

Méthodes publiques

Свойство Type Description
position Vector2
rotation float

Méthodes publiques

Méthode Description
TextRun ( BitmapFont font ) : System
compile ( ) : void

compiles the text into raw verts/texture coordinates. This method must be called anytime text or any other properties are changed.

render ( Graphics graphics ) : void
setFont ( BitmapFont font ) : TextRun
setHorizontalAlign ( HorizontalAlign hAlign ) : TextRun
setText ( string text ) : TextRun
setVerticalAlign ( VerticalAlign vAlign ) : TextRun

Private Methods

Méthode Description
updateCentering ( ) : void
updateSize ( ) : void

Method Details

TextRun() public méthode

public TextRun ( BitmapFont font ) : System
font BitmapFont
Résultat System

compile() public méthode

compiles the text into raw verts/texture coordinates. This method must be called anytime text or any other properties are changed.
public compile ( ) : void
Résultat void

render() public méthode

public render ( Graphics graphics ) : void
graphics Graphics
Résultat void

setFont() public méthode

public setFont ( BitmapFont font ) : TextRun
font BitmapFont
Résultat TextRun

setHorizontalAlign() public méthode

public setHorizontalAlign ( HorizontalAlign hAlign ) : TextRun
hAlign HorizontalAlign
Résultat TextRun

setText() public méthode

public setText ( string text ) : TextRun
text string
Résultat TextRun

setVerticalAlign() public méthode

public setVerticalAlign ( VerticalAlign vAlign ) : TextRun
vAlign VerticalAlign
Résultat TextRun

Property Details

position public_oe property

public Vector2 position
Résultat Vector2

rotation public_oe property

public float rotation
Résultat float