Line2DTests LineNotCrossingViewportIsHidden 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 LineNotCrossingViewportIsHidden()
Examples

[Test, CloseAfterFirstFrame]
public void LineNotCrossingViewportIsHidden()
{
    var line = new Line2D(new Vector2D(-1.0f, 0.2f), new Vector2D(0.2f, -1.0f), Color.Red);
    line.Clip(Rectangle.One);
    Assert.AreEqual(new Vector2D(-1.0f, 0.2f), line.StartPoint);
    Assert.AreEqual(new Vector2D(0.2f, -1.0f), line.EndPoint);
    Assert.IsFalse(line.IsVisible);
}
See Also