Table of Contents

Class Canvas

Namespace
MonoEight.Core.UI
Assembly
MonoEight.Template.dll

Manages the rendering of text to the screen for a given Scene.

public class Canvas
Inheritance
Canvas
Inherited Members

Constructors

Canvas(Scene)

Initializes a new instance of the Canvas class and loads the default fonts.

public Canvas(Scene scene)

Parameters

scene Scene

The Scene this canvas belongs to.

Methods

DrawText(SpriteBatch, string, FontSize, Point, Color)

Draws a string of text centered at the given position.

public void DrawText(SpriteBatch spriteBatch, string text, FontSize size, Point position, Color color)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

text string

The string of text to display.

size FontSize

The font to use.

position Point

The screen space point where the text will be drawn.

color Color

The color of the text.