GraphLineTests RefreshUpdatesLinesIfViewportChanged Method Delta Engine Documentation

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

public void RefreshUpdatesLinesIfViewportChanged()
Examples

[Test, CloseAfterFirstFrame]
public void RefreshUpdatesLinesIfViewportChanged()
{
    GraphLine line = CreateLineWithTwoPoints();
    line.graph.Viewport = Rectangle.FromCenter(0.4f, 0.4f, 0.8f, 0.8f);
    line.Refresh();
    Assert.IsTrue(line.lines[0].StartPoint.IsNearlyEqual(new Vector2D(0.5f, 0.4762f)));
    Assert.IsTrue(line.lines[0].EndPoint.IsNearlyEqual(new Vector2D(0.5952f, 0.4286f)));
}
See Also