private void PicMain_Paint(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; TextureBrush tb = mBitmapManager.GetTextureBrush(mAppState.Filter); if (mAppState.CurrentArea != Area.WholeImage) { mAppState.Area.FillArea(e.Graphics, tb); mAppState.Area.DrawAreaBound(e.Graphics, AREA_BOUND_PEN); } else { e.Graphics.FillRectangle(tb, 0, 0, PicMain.Width, PicMain.Height); UpdateHistograms(); } }