/// <summary>
        /// Fills out the info for a DrawArea
        /// </summary>
        /// <param name="h">Parent HistogramWin</param>
        /// <param name="d">data to draw</param>
        /// <param name="clr">color to paint the window</param>
        public void DrawAreaData(HistogramWin h, uint[] d, Color clr)
        {
            histo = h;
            largest = 0;  max = 0; min = 255;

            for (int i = 0; i < 256; i++)
            {
                if (d[i] > largest)
                    largest = d[i];
                if (d[i] > 0 && i < min)
                    min = i;
                if (d[i] > 0 && i > max)
                    max = i;
                data[i] = d[i];
            }
            ratio = (float)largest / (float)height;
            myPen = new Pen(clr);

            InitializeComponent();
        }
 private void histogramToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (hist == null)
         hist = new HistogramWin(this);
     hist.Show();
     hist.UpdateHistogram();
     hist.BringToFront();
 }
 private void hideHistogramToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (hist != null)
     {
         hist.Close();
         hist = null;
     }
 }