/// <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; } bool flipX = false; DA.GetData(1, ref flipX); bool flipY = false; DA.GetData(2, ref flipY); Filter filter = new Af.Mirror(flipY, flipX); image.Filters.Add(new Af.Mirror(flipY, flipX)); DA.SetData(0, image); DA.SetData(1, filter); }
public Mirror(Mirror filter) : base(filter) { this.aboutX = filter.aboutX; this.aboutY = filter.aboutY; SetFilter(); }