private IErrorDiffusion GetDitheringInstance() { IErrorDiffusion result; if (floydSteinbergRadioButton.Checked) { result = new FloydSteinbergDithering(); } else if (burkesRadioButton.Checked) { result = new BurksDithering(); } else if (jarvisJudiceNinkeDitheringradioButton.Checked) { result = new JarvisJudiceNinkeDithering(); } else if (stuckiRadioButton.Checked) { result = new StuckiDithering(); } else if (sierra3RadioButton.Checked) { result = new Sierra3Dithering(); } else if (sierra2RadioButton.Checked) { result = new Sierra2Dithering(); } else if (sierraLiteRadioButton.Checked) { result = new SierraLiteDithering(); } else if (atkinsonRadioButton.Checked) { result = new AtkinsonDithering(); } else if (randomRadioButton.Checked) { result = new RandomDithering(); } else { result = null; } return(result); }
private IErrorDiffusion GetDitheringInstance() { IErrorDiffusion result; if (rb_FloySteinbergDither.Checked) { result = new FloydSteinbergDithering(); } else if (rb_BurkesDither.Checked) { result = new BurksDithering(); } else if (rb_JarvisJudiceDither.Checked) { result = new JarvisJudiceNinkeDithering(); } else if (rb_StuckiDither.Checked) { result = new StuckiDithering(); } else if (rb_SierraDither.Checked) { result = new Sierra3Dithering(); } else if (rb_TwoRowSierraDither.Checked) { result = new Sierra2Dithering(); } else if (rb_SierraLiteDither.Checked) { result = new SierraLiteDithering(); } else if (rb_AtkinsonDither.Checked) { result = new AtkinsonDithering(); } else if (rb_RandomNoiseDither.Checked) { result = new RandomDithering(); } else if (rb_Bayer2Dither.Checked) { result = new Bayer2(); } else if (rb_Bayer3Dither.Checked) { result = new Bayer3(); } else if (rb_Bayer4Dither.Checked) { result = new Bayer4(); } else if (rb_Bayer8Dither.Checked) { result = new Bayer8(); } else { result = null; } return(result); }