private void ShowGradient(System.Drawing.Graphics g, int startHue, float saturation, float lightness) { for (int i = 0; i <= PictureBoxBefore.Width - 1; i++) { RgbColor c = Aurigma.GraphicsMill.RgbColor.FromHsl(Convert.ToInt32(System.Math.Round(Convert.ToSingle(startHue) + Convert.ToSingle(i) / Convert.ToSingle(PictureBoxBefore.Width) * 360 + 360) % 360), saturation, lightness); System.Drawing.Pen p = new System.Drawing.Pen(c.ToGdiPlusColor()); g.DrawLine(p, i, 0, i, PictureBoxBefore.Height - 1); } }