Property | Type | Description | |
---|---|---|---|
AdvanceWidth | double | ||
CharacterBoundingBoxHeight | double | ||
CharacterBoundingBoxWidth | double |
Method | Description | |
---|---|---|
ComputeWidth ( string text ) : double |
Computes the expected width of text string given. The height is always 1.0. Model space coordinates.
|
|
TextureFont ( int textureId ) : System.Diagnostics |
Create a TextureFont object. The sent-in textureId should refer to a texture bitmap containing a 16x16 grid of fixed-width characters, representing the ASCII table. A 32 bit texture is assumed, aswell as all GL state necessary to turn on texturing. The dimension of the texture bitmap may be anything from 128x128 to 512x256 or any other order-by-two-squared-dimensions.
|
|
WriteString ( string text ) : void |
Draw an ASCII string around coordinate (0,0,0) in the XY-plane of the model space coordinate system. The height of the text is 1.0. The width may be computed by calling ComputeWidth(string). This call modifies the currently bound 2D-texture, but no other GL state.
|
|
WriteStringAt ( string text, double heightPercent, double xPercent, double yPercent, double degreesCounterClockwise ) : void |
This is a convenience function to write a text string using a simple coordinate system defined to be 0..100 in x and 0..100 in y. For example, writing the text at 50,50 means it will be centered onscreen. The height is given in percent of the height of the viewport. No GL state except the currently bound texture is modified. This method is not as flexible nor as fast as the WriteString() method, but it is easier to use.
|
Method | Description | |
---|---|---|
ComputeAspectRatio ( ) : double | ||
WriteCharacter ( char ch, double xpos ) : void |
public TextureFont ( int textureId ) : System.Diagnostics | ||
textureId | int | |
return | System.Diagnostics |
public WriteStringAt ( string text, double heightPercent, double xPercent, double yPercent, double degreesCounterClockwise ) : void | ||
text | string | |
heightPercent | double | |
xPercent | double | |
yPercent | double | |
degreesCounterClockwise | double | |
return | void |
public double CharacterBoundingBoxHeight | ||
return | double |