private void RunAnimation() { GraphParams gp = new GraphParams(XDIM, YDIM, BITCOLS, BITROWS, filtering, gamma, dBBox.Checked, MultiplyBox.Checked, ColorBox.Checked); if (GuiUtil.DrawGraph(ref fullBit, Radars, GaussianKernel, gp)) { Graphics g = this.tabPage1.CreateGraphics(); double ratio = (double)BITCOLS / (double)BITROWS; g.DrawImage(fullBit, 5, 30, (ratio > 1.0 ? 300 : (int)(300 * ratio)), (ratio > 1.0 ? (int)(300 / ratio) : 300)); g.Dispose(); } }