Undo/Redo Stacks & Flood Fill

Ty for this aia. Does this mean that the user will not be allowed to import other Quilt Designs from their phone? That option is a big part of this app. There are over 1,000 traditional quilt designs in the history of quilting.

Is it possible to revisit your very first aia? Even though it was locking up, the undo/redo was very clean, similar to how clean Passos Scanline Flood Fill is. Also, I think your 1st method allowed user to import designs from their phone.

I remember reading about timing the undo/redo's, so that the phone's resources can catch up. Could that be a possible solution to your 1st method?

Note: I am still not able to figure out Passos newer extension, Canvas Layers. I don't see anything when I click SelectLayer, and I am still not clear as to the purpose of the Vertical Scrolling Arrangement.

At this point, I am using ABG's method, where the last redo will not generate. I feel like we are so close with all 3 methods.

They can, but would need, as a minimum to provide the polygons list for the design with the correct values to match the canvas size. As I said, it is possible to calculate the circle sizes and locations from the polygon x,y values. As you will have seen, my undo/redo method will work with any drawing method.

You are welcome to.

Only for you, no lockups here.

probably not necessary for the methods I have provided (probably the same for @ABG 's methods)

This issue is in your blocks. If you shared your entire aia project, @ABG may take a look and fix it.

You could help by sharing your svg file (just add a .txt to the filename) to upload here. We can then see if polygons are available for programming.

Maybe @Passos_0213 can provide an example floodfill project based on your pattern template?

1 Like

I sent Passos my aia using the Canvas Layers extension. Hopefully, he will be able to help me.

1 Like

Template Flood Fill with Canvas Layer Extension

FloodFillDemo.aia (78.1 KB)

With the same extension you can create Undo and Redo.

@Passos_0213

Not sure if that helps the OP.

Could you provide an example for floodfill of a background image, as provided by the OP here

I was hoping for an example where the User fills the background image, and then clicks to remove the Outlines, leaving the colored filled areas only.

1 Like

Which is why I have asked for such an example.

1 Like

Ok. I understood


FloodFillDemo.aia (210.6 KB)

Is there a method to clear the memory? There was in the legacy extension.

image

I have reworked/cleaned out your demo to focus on pattern filling. Works very well, no artifcats.

FloodFillDemo2.aia (217.6 KB)

1 Like

That's great! I thought I had shared the Java code here; I believe I did it in the Kodular community. I'll also post it in the App Inventor community.