RelativeScreenSpaceTests ToRelativeWithUnevenSize 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 ToRelativeWithUnevenSize()
Examples

[Test]
public void ToRelativeWithUnevenSize()
{
    window.ViewportPixelSize = new Size(99, 199);
    var screen = new RelativeScreenSpace(window);
    Assert.AreEqual(Vector2D.Zero, screen.TopLeft);
    Assert.AreEqual(Vector2D.One, screen.BottomRight);
    Assert.AreEqual(screen.BottomRight, screen.FromPixelSpace(new Vector2D(99, 199)));
}
See Also