VectorText Text Property Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Fonts
Assembly: DeltaEngine.Rendering2D.Fonts (in DeltaEngine.Rendering2D.Fonts.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string Text { get; set; }

Property Value

Type: String
Remarks

Tests: DeltaEngine.Rendering2D.Fonts.Tests.VectorTextTests
Examples

6 unit tests call DeltaEngine.Rendering2D.Fonts.VectorText.Text
[Test, ApproveFirstFrameScreenshot]
public void DrawSampleText()
{
    new VectorText("The Quick Brown Fox...", Vector2D.Half) { Color = Color.Red };
    new VectorText("Jumps Over The Lazy Dog", new Vector2D(0.5f, 0.6f)) { Color = Color.Teal };
}
[Test, ApproveFirstFrameScreenshot]
public void DrawBigText()
{
    new VectorText("Yo yo, whats up", Vector2D.Half) { Size = new Size(0.1f) };
}
[Test, CloseAfterFirstFrame]
public void DrawingTwoVectorTextsWithTheSameRenderLayerOnlyIssuesOneDrawCall()
{
    new VectorText("Yo yo, whats up", Vector2D.Half) { Size = new Size(0.1f) };
    new VectorText("Jumps Over The Lazy Dog", new Vector2D(0.5f, 0.6f)) { Color = Color.Teal };
    RunAfterFirstFrame(
        () => Assert.AreEqual(1, Resolve<Drawing>().NumberOfDynamicDrawCallsThisFrame));
}
See Also