private void DrawPaths() { this.Controls.Where(i => i.Value.GetType() == typeof(Path)).ToList().ForEach((i) => { LinearInterpolator pol = (i.Value as Path).Poly; for (int j = bounds.l; j < bounds.r; j++) { FillBuffer(j, ToInt32(pol.ValueForX(j) + Abs(pol.DerivativeForX(j))) + 2, Abs(ToInt32(pol.DerivativeForX(j)) * 2) + 4, 1, i.Value.MadeOf, i.Value.z); } }); }