Line2DTests LineEnteringBottomEdgeIsClipped Method Delta Engine Documentation

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

public void LineEnteringBottomEdgeIsClipped()
Examples

[Test, CloseAfterFirstFrame]
public void LineEnteringBottomEdgeIsClipped()
{
    var line = new Line2D(new Vector2D(0.4f, 0.5f), new Vector2D(0.3f, 1.5f), Color.Red);
    line.Clip(Rectangle.FromCenter(0.5f, 0.5f, 0.5f, 0.5f));
    Assert.AreEqual(new Vector2D(0.4f, 0.5f), line.StartPoint);
    Assert.AreEqual(new Vector2D(0.375f, 0.75f), line.EndPoint);
    Assert.IsTrue(line.IsVisible);
}
See Also