public Bitmap GetTrail(int width, int height) { if (width > 0 && height > 0) { Bitmap bmp = new Bitmap(width, height); Graphics g = Graphics.FromImage(bmp); PointF center = new PointF(width / 2f, height / 2f); var curr = Trail.GetEnumerator(); if (curr.MoveNext()) { var prev = curr; while (curr.MoveNext()) { g.DrawLine(new Pen(colorTrail, 1), curr.Current.X + center.X, curr.Current.Y + center.Y, prev.Current.X + center.X, prev.Current.Y + center.Y); prev = curr; } } return(bmp); } return(null); }