Line2D DrawArea 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 override Rectangle DrawArea { get; set; }

Property Value

Type: Rectangle
Remarks

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

2 unit tests call DeltaEngine.Rendering2D.Shapes.Line2D.DrawArea
[Test, CloseAfterFirstFrame]
public void ChangingDrawAreaChangesStartAndEndPoints()
{
    var line = new Line2D(new Vector2D(1, 2), new Vector2D(3, 5), Color.White);
    line.DrawArea = new Rectangle(11, 12, 5, 6);
    Assert.AreEqual(new Vector2D(11, 12), line.StartPoint);
    Assert.AreEqual(new Vector2D(16, 18), line.EndPoint);
    Assert.AreEqual(new Rectangle(11, 12, 5, 6), line.DrawArea);
}
[Test, CloseAfterFirstFrame]
public void ChangingStartAndEndPointsChangesDrawArea()
{
    var line = new Line2D(new Vector2D(1, 2), new Vector2D(3, 5), Color.White);
    line.StartPoint = new Vector2D(11, 12);
    line.EndPoint = new Vector2D(16, 18);
    Assert.AreEqual(new Rectangle(11, 12, 5, 6), line.DrawArea);
}
See Also