Namespace: DeltaEngine.Rendering2D.Shapes.Tests
Assembly: DeltaEngine.Rendering2D.Shapes.Tests (in DeltaEngine.Rendering2D.Shapes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Rendering2D.Shapes.Tests (in DeltaEngine.Rendering2D.Shapes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void LineCrossingViewportIsClippedAtStartAndEnd() { var line = new Line2D(new Vector2D(-1.0f, 0.4f), new Vector2D(2.0f, 0.6f), Color.Red); line.Clip(Rectangle.FromCenter(0.5f, 0.5f, 0.5f, 0.5f)); Assert.IsTrue(line.StartPoint.IsNearlyEqual(new Vector2D(0.25f, 0.4833f))); Assert.IsTrue(line.EndPoint.IsNearlyEqual(new Vector2D(0.75f, 0.5167f))); Assert.IsTrue(line.IsVisible); }
See Also