Namespace: DeltaEngine.Rendering2D.Shapes
Assembly: DeltaEngine.Rendering2D.Shapes (in DeltaEngine.Rendering2D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering2D.Shapes.Tests.Line2DTests
19 unit tests call DeltaEngine.Rendering2D.Shapes.Line2D.StartPoint
Assembly: DeltaEngine.Rendering2D.Shapes (in DeltaEngine.Rendering2D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Vector2DRemarks
Examples
[Test, CloseAfterFirstFrame] public void CreateLine() { var line = new Line2D(Vector2D.Zero, Vector2D.One, Color.Red); Assert.AreEqual(Vector2D.Zero, line.StartPoint); Assert.AreEqual(Vector2D.One, line.EndPoint); Assert.AreEqual(Color.Red, line.Color); Assert.AreEqual(2, line.Points.Count); }
[Test, CloseAfterFirstFrame] public void MoveLineViaItsEndPoints() { var line = new Line2D(Vector2D.Zero, Vector2D.Zero, Color.Red) { StartPoint = Vector2D.Half, EndPoint = Vector2D.One }; Assert.AreEqual(Vector2D.Half, line.StartPoint); Assert.AreEqual(Vector2D.One, line.EndPoint); }
[Test, CloseAfterFirstFrame] public void MoveLineByAssigningListOfPoints() { var line = new Line2D(Vector2D.Zero, Vector2D.Zero, Color.Red); line.Points = new List<Vector2D> { Vector2D.Half, Vector2D.One }; Assert.AreEqual(Vector2D.Half, line.StartPoint); Assert.AreEqual(Vector2D.One, line.EndPoint); }
See Also