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.
ファイルを表示 Open project: prime31/Nez

Public Properties

Property Type Description
position Vector2
rotation float

Public Methods

Method 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

Method Description
updateCentering ( ) : void
updateSize ( ) : void

Method Details

TextRun() public method

public TextRun ( BitmapFont font ) : System
font BitmapFont
return System

compile() public method

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

render() public method

public render ( Graphics graphics ) : void
graphics Graphics
return void

setFont() public method

public setFont ( BitmapFont font ) : TextRun
font BitmapFont
return TextRun

setHorizontalAlign() public method

public setHorizontalAlign ( HorizontalAlign hAlign ) : TextRun
hAlign HorizontalAlign
return TextRun

setText() public method

public setText ( string text ) : TextRun
text string
return TextRun

setVerticalAlign() public method

public setVerticalAlign ( VerticalAlign vAlign ) : TextRun
vAlign VerticalAlign
return TextRun

Property Details

position public_oe property

public Vector2 position
return Vector2

rotation public_oe property

public float rotation
return float