Esempio n. 1
0
        private void ModifyCustomFilter(object sender, EventArgs e)
        {
            CustomFunctionFilter f = mBitmapManager.GetProperFilter(Filter.CustomFunction) as CustomFunctionFilter;
            Control c = sender as Control;

            if (c.Name.Equals(FilterPreviewR.Name))
            {
                f.RedValues = EditColorCurveForm.ShowForm(f.RedValues);
                FilterPreviewR.UpdateData(f.RawRedValues);
            }
            else if (c.Name.Equals(FilterPreviewG.Name))
            {
                f.GreenValues = EditColorCurveForm.ShowForm(f.GreenValues);
                FilterPreviewG.UpdateData(f.RawGreenValues);
            }
            else if (c.Name.Equals(FilterPreviewB.Name))
            {
                f.BlueValues = EditColorCurveForm.ShowForm(f.BlueValues);
                FilterPreviewB.UpdateData(f.RawBlueValues);
            }
            mBitmapManager.GenerateBitmap((int)Filter.CustomFunction);
            PicMain.Invalidate();
        }