public void PlotData(Point point) { var line = new LightLine(); if (_dataLineChunk.ChunkList.Count == 0) { line.X1 = (point.X - _xStart) / _incrementX * _xInterval; line.Y1 = (-point.Y + _yStart + _yRange) / _incrementY * _yInterval; line.X2 = (point.X - _xStart) / _incrementX * _xInterval; line.Y2 = (-point.Y + _yStart + _yRange) / _incrementY * _yInterval; } else { line.X1 = (point.X - _xStart) / _incrementX * _xInterval; line.Y1 = (-point.Y + _yStart + _yRange) / _incrementY * _yInterval; line.X2 = ((LightLine)_dataLineChunk.ChunkList[_dataLineChunk.ChunkList.Count - 1]).X1; line.Y2 = ((LightLine)_dataLineChunk.ChunkList[_dataLineChunk.ChunkList.Count - 1]).Y1; } _dataLineChunk.Add(line); if (line.Y2 > _height || line.Y2 < 0 || line.Y1 > _height || line.Y1 < 0) { Zoom(1); } if (!(line.X1 >= _width)) { return; } Translate(line.X2 - line.X1 * 2, 0); if (_dataLineChunk.ChunkList.Count > 1000) { _dataLineChunk.Clear(); } if (line.Y1 >= 0 && line.Y1 <= _height && line.Y2 >= 0 && line.Y2 <= _height) { Zoom(-1); } }
public void PenClear() { _penlineChunk.Clear(); Update(); }
public void ClearTempLineChunk() { _templineChunk.Clear(); }