Namespace: DeltaEngine.ScreenSpaces
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.ScreenSpaces.RelativeScreenSpaceTests
1 unit tests call DeltaEngine.ScreenSpaces.RelativeScreenSpace.FromPixelSpace(DeltaEngine.Datatypes.Vector2D)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- pixelPosition
- Type: DeltaEngine.Datatypes Vector2D
Return Value
Type: Vector2DRemarks
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