Namespace: DeltaEngine.Tests.ScreenSpaces
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void ToPixelWithUnevenSizeFromQuadraticSpace() { window.ViewportPixelSize = new Size(99, 199); var screen = new QuadraticScreenSpace(window); Assert.AreEqual(new Vector2D(149, 199), screen.ToPixelSpace(Vector2D.One)); Assert.AreEqual(new Vector2D(-50, 0), screen.ToPixelSpace(Vector2D.Zero)); Assert.AreEqual(new Vector2D(49.5f, 99.5f), screen.ToPixelSpace(Vector2D.Half)); Assert.AreEqual(new Vector2D(50, 100), screen.ToPixelSpaceRounded(Vector2D.Half)); Assert.AreEqual(new Vector2D(199, 199), screen.ToPixelSpaceRounded(Vector2D.One) - screen.ToPixelSpaceRounded(Vector2D.Zero)); }
See Also