Table of Contents

Interface ITextRenderer

Namespace
BSGameLib.Game.Rendering
Assembly
BSGameLib.Game.dll

Converts text into sprite draw descriptors so glyphs flow through the encoder path.

public interface ITextRenderer

Methods

DrawText(IFont, string, Vector2, Color, float, Vector2, Vector2, Action<SpriteDrawOptions>, float)

Converts text, set in font, into sprite draws and passes each one to submitSprite.

void DrawText(IFont font, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, Action<SpriteDrawOptions> submitSprite, float letterSpacing = 0)

Parameters

font IFont
text string
position Vector2
color Color
rotation float

The rotation about origin, in degrees.

origin Vector2
scale Vector2
submitSprite Action<SpriteDrawOptions>
letterSpacing float

Extra space, in pixels, added after each character.