public void SettingValueLeftOfAllIndicesExpands() { var rectangles = new[] { Rectangle.One, Rectangle.Zero, Rectangle.One }; var rectGraph = new RangeGraph <Rectangle>(rectangles[1], rectangles[2]); rectGraph.SetValue(-1, rectangles[0]); Assert.AreEqual(rectangles, rectGraph.Values); }
public void SetValuesToSeveralGraphTypes() { var vectorGraph = new RangeGraph <Vector3D>(Vector3D.Zero, Vector3D.UnitZ); var colorGraph = new RangeGraph <Color>(Color.Red, Color.Orange); colorGraph.SetValue(1, Color.Gold); Assert.AreEqual(Vector3D.Zero, vectorGraph.Start); Assert.AreEqual(Vector3D.UnitZ, vectorGraph.Values[1]); Assert.AreEqual(Color.Gold, colorGraph.End); }
public void SetValuesToSeveralGraphTypes() { var vectorGraph = new RangeGraph<Vector3D>(Vector3D.Zero, Vector3D.UnitZ); var colorGraph = new RangeGraph<Color>(Color.Red, Color.Orange); colorGraph.SetValue(1, Color.Gold); Assert.AreEqual(Vector3D.Zero, vectorGraph.Start); Assert.AreEqual(Vector3D.UnitZ, vectorGraph.Values[1]); Assert.AreEqual(Color.Gold, colorGraph.End); }
public void SettingValueLeftOfAllIndicesExpands() { var rectangles = new[] { Rectangle.One, Rectangle.Zero, Rectangle.One }; var rectGraph = new RangeGraph<Rectangle>(rectangles[1], rectangles[2]); rectGraph.SetValue(-1, rectangles[0]); Assert.AreEqual(rectangles, rectGraph.Values); }
public void SetValue(int index, Color value) { colorIntervals.SetValue(index, value); UpdateDrawingToRanges(); }