Line2D Points Property Delta Engine Documentation

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

public List<Vector2D> Points { get; set; }

Property Value

Type: List Vector2D 
Remarks

Tests: DeltaEngine.Rendering2D.Shapes.Tests.Line2DTests
Examples

6 unit tests call DeltaEngine.Rendering2D.Shapes.Line2D.Points
[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);
}
[Test]
public void RenderRedSquareWithMissingTop()
{
    var line = CreateRedBox();
    var points = line.Points;
    points.RemoveAt(0);
    points.RemoveAt(0);
}
See Also