InvertedScreenSpaceTests ToPixelSpaceAndFromInvertedSpace 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 ToPixelSpaceAndFromInvertedSpace()
Examples

[Test]
public void ToPixelSpaceAndFromInvertedSpace()
{
    window.ViewportPixelSize = new Size(75, 100);
    var screen = new InvertedScreenSpace(window);
    Assert.AreEqual(Vector2D.Zero, screen.ToPixelSpace(screen.TopLeft));
    Assert.AreEqual(new Vector2D(75, 100), screen.ToPixelSpace(screen.BottomRight));
    Assert.AreEqual(Size.Zero, screen.ToPixelSpace(Size.Zero));
    Assert.AreEqual(new Size(75, 100), screen.ToPixelSpace(Size.One));
}
See Also