コード例 #1
0
		private static void RemoveFirstPointAndShiftOthersBack(GraphLine line)
		{
			float interval = line.points[1].X - line.points[0].X;
			line.points.RemoveAt(0);
			for (int i = 0; i < line.points.Count; i++)
				line.points[i] = new Vector2D(line.points[i].X - interval, line.points[i].Y);
		}
コード例 #2
0
ファイル: Graph.cs プロジェクト: whztt07/DeltaEngine
		public GraphLine CreateLine(string key, Color color)
		{
			var line = new GraphLine(this) { Key = key, Color = color };
			Lines.Add(line);
			renderKey.Refresh(this);
			return line;
		}
コード例 #3
0
		private void PrunePointsFromLine(GraphLine line)
		{
			var numberOfPointsToRemove = line.points.Count - MaximumNumberOfPoints;
			if (numberOfPointsToRemove <= 0)
				return;
			for (int i = 0; i < numberOfPointsToRemove; i++)
				RemoveFirstPointAndShiftOthersBack(line);
			line.Refresh();
		}
コード例 #4
0
        private static void RemoveFirstPointAndShiftOthersBack(GraphLine line)
        {
            float interval = line.points[1].X - line.points[0].X;

            line.points.RemoveAt(0);
            for (int i = 0; i < line.points.Count; i++)
            {
                line.points[i] = new Vector2D(line.points[i].X - interval, line.points[i].Y);
            }
        }
コード例 #5
0
ファイル: Graph.cs プロジェクト: cyecp/DeltaEngine.OpenTK
        public GraphLine CreateLine(string key, Color color)
        {
            var line = new GraphLine(this)
            {
                Key = key, Color = color
            };

            Lines.Add(line);
            renderKey.Refresh(this);
            return(line);
        }
コード例 #6
0
        private void PrunePointsFromLine(GraphLine line)
        {
            var numberOfPointsToRemove = line.points.Count - MaximumNumberOfPoints;

            if (numberOfPointsToRemove <= 0)
            {
                return;
            }
            for (int i = 0; i < numberOfPointsToRemove; i++)
            {
                RemoveFirstPointAndShiftOthersBack(line);
            }
            line.Refresh();
        }
コード例 #7
0
ファイル: Graph.cs プロジェクト: whztt07/DeltaEngine
		public void RemoveLine(GraphLine line)
		{
			line.Clear();
			Lines.Remove(line);
			renderKey.Refresh(this);
		}
コード例 #8
0
ファイル: Graph.cs プロジェクト: cyecp/DeltaEngine.OpenTK
 public void RemoveLine(GraphLine line)
 {
     line.Clear();
     Lines.Remove(line);
     renderKey.Refresh(this);
 }