private void UpdateHistograms() { (int[] rCounted, int[] gCounted, int[] bCounted) = mAppState.Area.CountPixels(mBitmapManager.GetProperBitmap(mAppState.Filter)); HistogramR.UpdateData(rCounted); HistogramG.UpdateData(gCounted); HistogramB.UpdateData(bCounted); }
public void InitializeForm() { mBitmapManager = new BitmapManager(new Bitmap((Bitmap)PicMain.Image, new Size(PicMain.Width, PicMain.Height))); mAppState = new ApplicationState(); mAppState.Area = new CircleArea(new Point(-100, -100), 100); HistogramR.InitializeHistogram(Color.Red); HistogramG.InitializeHistogram(Color.Green); HistogramB.InitializeHistogram(Color.Blue); FilterPreviewR.InitializePreviewChart(); FilterPreviewG.InitializePreviewChart(); FilterPreviewB.InitializePreviewChart(); CustomFunctionFilter f = mBitmapManager.GetProperFilter(Filter.CustomFunction) as CustomFunctionFilter; FilterPreviewR.UpdateData(f.RawRedValues); FilterPreviewG.UpdateData(f.RawGreenValues); FilterPreviewB.UpdateData(f.RawBlueValues); ApplyFilterUI(); ApplyModeUI(); }