/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { IGH_Goo goo = null; Image image = new Image(); if (!DA.GetData(0, ref goo)) { return; } if (!goo.TryGetImage(ref image)) { return; } Color color = Color.Black; DA.GetData(1, ref color); Filter filter = new Af.Shrink(color); image.Filters.Add(new Af.Shrink(color)); DA.SetData(0, image); DA.SetData(1, filter); }
public Shrink(Shrink filter) : base(filter) { this.color = filter.color; SetFilter(); }