Ejemplo n.º 1
0
        public void Render(IRenderer renderer, Dimensions info, bool lowQuality)
        {
            if (Visible == false)
            {
                return;
            }

            Point clipPoint = new Point(info.DataOffsetX, info.DataOffsetY);
            Size  clipSize  = new Size(info.DataWidth, info.DataHeight);

            renderer.Clip(clipPoint, clipSize);

            renderer.AntiAlias(AntiAlias && (lowQuality == false));

            // TODO: optimize speed by pre-allocating this memory?
            Point[] points = new Point[Xs.Length];
            for (int i = 0; i < Xs.Length; i++)
            {
                points[i] = new Point(info.GetPixelX(Xs[i], XAxisIndex), info.GetPixelY(Ys[i], YAxisIndex));
            }

            renderer.DrawLines(points, Color, LineWidth);

            renderer.ClipReset();
        }