示例#1
0
        private void DrawSeries(MySeries s, Brush brush, float moveY, float scale)
        {
            int begin, end;

            begin = s.begin < this._minX ? (int)this._minX : s.begin;
            float maxX = this._minX + (renderControl.ClientSize.Width - 40) / this._scale_times_X;

            end = maxX > s.end ? s.end : (int)Math.Ceiling(maxX);
            RawVector2 p_current, p_next;

            if (begin - s.begin < s.data.Length)
            {
                p_current = getPixelPoint(begin, s.data[begin - s.begin], moveY, scale);
            }
            else
            {
                return;
            }
            for (int i = begin + 1; i <= end; i++)
            {
                p_next = getPixelPoint(i, s.data[i - s.begin], moveY, scale);
                _renderTarget.DrawLine(p_current, p_next, brush, 0.6f);
                p_current = p_next;
            }
        }
示例#2
0
 public void Clear()
 {
     this._wave     = null;
     this._spec     = null;
     this._specspec = null;
     this._cepstrum = null;
     this.Refresh();
 }
示例#3
0
        private void DrawSeriesHalfLog(MySeries s, Brush brush, float moveY, float scale)
        {
            int begin, end;

            begin = s.begin < this._minX ? (int)this._minX : s.begin;
            float maxX = this._minX + (renderControl.ClientSize.Width - 40) / this._scale_times_X;

            end = maxX > s.end ? s.end : (int)Math.Ceiling(maxX);
            for (int i = begin + 1; i <= end && i - s.begin <= Setting.FrameLength / 2; i++)
            {
                _renderTarget.DrawLine(getPixelPoint(i - 1, (float)Math.Log10(s.data[i - s.begin - 1]), moveY, scale),
                                       getPixelPoint(i, (float)Math.Log10(s.data[i - s.begin]), moveY, scale),
                                       brush);
            }
        }