RelativeScreenSpace TopLeft Property Delta Engine Documentation

Namespace: DeltaEngine.ScreenSpaces
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override Vector2D TopLeft { get; }

Property Value

Type: Vector2D
Remarks

Tests: DeltaEngine.Tests.ScreenSpaces.RelativeScreenSpaceTests
Examples

1 unit tests call DeltaEngine.ScreenSpaces.RelativeScreenSpace.TopLeft
[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