QuadraticScreenSpaceTests ToPixelWithSquareWindow Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.ScreenSpaces
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ToPixelWithSquareWindow()
Examples

[Test]
public void ToPixelWithSquareWindow()
{
    window.ViewportPixelSize = new Size(100, 100);
    var screen = new QuadraticScreenSpace(window);
    Assert.AreEqual(new Vector2D(100, 100), screen.ToPixelSpace(Vector2D.One));
    Assert.AreEqual(Vector2D.Zero, screen.ToPixelSpace(Vector2D.Zero));
    Assert.AreEqual(new Vector2D(50, 50), screen.ToPixelSpace(Vector2D.Half));
}
See Also