GraphLine ClassDelta Engine Documentation
A line on a graph: consists of a list of points and a list of lines connecting them. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Rendering2D.Graphs GraphLine

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

public class GraphLine

The GraphLine type exposes the following members.

Methods

  NameDescription
Public methodAddPoint
Public methodAddValue(Single)
Public methodAddValue(Single, Single)
Public methodClear
Public methodRefresh
Public methodRemoveAt
Top
Properties

  NameDescription
Public propertyColor
Public propertyKey
Top
Remarks

Tests: DeltaEngine.Rendering2D.Graphs.Tests.GraphLineTests
Examples

16 unit tests call DeltaEngine.Rendering2D.Graphs.GraphLine
[Test, CloseAfterFirstFrame]
public void CheckLineColor()
{
    var line = graph.CreateLine("", Color.Blue);
    line.AddPoint(Vector2D.Zero);
    line.AddPoint(Vector2D.One);
    Assert.AreEqual(Color.Blue, line.Color);
    Assert.AreEqual(Color.Blue, line.lines[0].Color);
    line.Color = Color.Green;
    Assert.AreEqual(Color.Green, line.Color);
}
[Test, CloseAfterFirstFrame]
public void ChangeLineColor()
{
    var line = graph.CreateLine("", Color.Blue);
    line.AddPoint(Vector2D.Zero);
    line.AddPoint(Vector2D.One);
    line.Color = Color.Green;
    Assert.AreEqual(Color.Green, line.Color);
    Assert.AreEqual(Color.Green, line.lines[0].Color);
}
[Test, CloseAfterFirstFrame]
public void ChangeLineKey()
{
    var line = graph.CreateLine("ABC", Color.Blue);
    Assert.AreEqual("ABC", line.Key);
    line.Key = "DEF";
    Assert.AreEqual("DEF", line.Key);
}
See Also