/// <summary> /// Initializes a new instance of the <see cref="AdaptiveBinarizeForm"/> class. /// </summary> /// <param name="viewer">The image viewer for image preview.</param> /// <param name="rect">Selection rectangle.</param> /// <param name="blendColor">Blend color.</param> /// <param name="blendMode">Blending mode.</param> public ColorBlendForm(ImageViewer viewer, Rectangle rect, Color blendColor, BlendingMode blendMode) { InitializeComponent(); _imageProcessingPreviewInViewer = new ImageProcessingPreviewManager(viewer); _imageProcessingPreviewInViewer.UseCurrentViewerZoomWhenPreviewProcessing = true; _blendMode = blendMode; // set available blending modes Array values = Enum.GetValues(typeof(BlendingMode)); object[] vals = new object[values.Length]; values.CopyTo(vals, 0); blendModeComboBox.Items.AddRange(vals); blendModeComboBox.SelectedItem = blendMode; // set blend color channelAlphaTrackBar.Value = blendColor.A; channelRedTrackBar.Value = blendColor.R; channelGreenTrackBar.Value = blendColor.G; channelBlueTrackBar.Value = blendColor.B; _disableBlending = false; SetColor(); }
/// <summary> /// Initializes a new instance of the <see cref="ParamsConfigForm"/> class. /// </summary> /// <param name="viewer">Image viewer to preview the processing result.</param> public ParamsConfigForm(ImageViewer viewer) : base() { _imageProcessingPreviewInViewer = new ImageProcessingPreviewManager(viewer); }
/// <summary> /// Initializes a new instance of the <see cref="ParamsConfigForm"/> class. /// </summary> protected ParamsConfigForm() : base() { _imageProcessingPreviewInViewer = new ImageProcessingPreviewManager(null); }