d2d.font.bmtext



class BMText: d2d.core.transformable.Transformable, d2d.font.itext.IText;
Implementation containing text drawable functions using an AngelCode BMFont. Nice and fast for unscaled text, reduced memory usage, render time scales with text length, no re-render times, requires some additional shader uniforms.

this(BMFont font);
Creates an empty bmfont text

@property float scale();
Gets the scale in percent.

@property void scale(float value);
Sets the scale in percent.

@property string text();
Gets the text.

@property void text(string value);
Modifies the text.

@property bool multiline();
Returns if this text should be rendered multiline.

@property void multiline(bool value);
Sets if this text should be rendered multiline.

void draw(IRenderTarget target, ShaderProgram shader = null);
Dynamically draws the text onto a target. Requires the shader to have
texRect
vec4(uvX, uvY, uvW, uvH) and
sizeRect
vec4(posX, posY, width, height) uniforms.


Page generated by Ddoc.