override public bool Execute() { Context.Push(); if (_color != null) { RGB foreground = _color.GetColor(); if (foreground != null) { Console.WriteLine("Ok2!"); Context.Foreground = foreground; } } else { Console.WriteLine("No color!"); } Context.Opacity = _opacity; ActiveDrawable.EditStroke(); Context.Pop(); return(true); }
protected override IEnumerable ListParameters() { RGB rgb = _objc.GetColor(); byte red, green, blue; rgb.GetUchar(out red, out green, out blue); yield return("New: channel"); yield return("Color Indicates: " + _colorIndicates); yield return("Color:"); yield return("Red: " + red); yield return("Green: " + green); yield return("Blue: " + blue); yield return("Opacity: " + _opacity); }
protected override IEnumerable ListParameters() { // Fix me: contentlayer can also be a gradient layer and not only a fill layer!!! if (_color != null) { RGB rgb = _color.GetColor(); yield return("Slot Color: RGB color"); yield return(String.Format("Red: {0:F3}", rgb.R * 255)); yield return(String.Format("Green: {0:F3}", rgb.G * 255)); yield return(String.Format("Blue: {0:F3}", rgb.B * 255)); } }
override public bool Execute() { var image = ActiveImage; _layerNr++; var layer = new Layer(image, "Color Fill " + _layerNr, ImageType.Rgba); image.InsertLayer(layer, 0); image.ActiveLayer = layer; SelectedLayer = layer; Context.Push(); Context.Foreground = _clr.GetColor(); layer.Fill(FillType.Foreground); Context.Pop(); return(true); }