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.ToPixelSpace(DeltaEngine.Datatypes.Size)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- currentScreenSpaceSize
- Type: DeltaEngine.Datatypes Size
Return Value
Type: SizeRemarks
Examples
[Test] public void ToPixelSpaceFromRelativeSpace() { window.ViewportPixelSize = new Size(30, 50); var screen = new RelativeScreenSpace(window); Assert.AreEqual(new Vector2D(30, 50), screen.ToPixelSpace(Vector2D.One)); Assert.AreEqual(Size.Zero, screen.ToPixelSpace(Size.Zero)); Assert.AreEqual(new Vector2D(10, 20), screen.ToPixelSpace(new Vector2D(10 / 30.0f, 20 / 50.0f))); Assert.AreEqual(new Size(7.5f, 12.5f), screen.ToPixelSpace(new Size(0.25f))); }
See Also