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

[Test]
public void SquareWindowWithRelativeSpace()
{
    SquareWindowShouldAlwaysReturnRelativeValues(new RelativeScreenSpace(window));
}
[Test]
public void NonSquareWindowWithRelativeSpace()
{
    window.ViewportPixelSize = new Size(100, 75);
    var screen = new RelativeScreenSpace(window);
    Assert.AreEqual(0.0f, screen.Left);
    Assert.AreEqual(0.0f, screen.Top);
    Assert.AreEqual(1.0f, screen.Right);
    Assert.AreEqual(1.0f, screen.Bottom);
}
See Also