I had this drawing demo application built for use in another project. I am releasing it here to demonstrate how to do various drawing functions in Firemonkey. It works on both Android and IOS. There is a bug with the ellipse tool. In any event it features a Pen tool, a Line tool, a Rectangle tool, an Ellipse tool, a Fill tool, and a bitmap stamping tool (select image from file). Additionally, you can adjust the line width, the line color, and the fill color. It uses a custom TPaintBox component to take care of the drawing. It uses one set of drawing code for Windows and a second set of drawing code for Android and IOS. This was a workaround for a bug that happens when the thickness of the line is larger than 1 on mobile devices.
Download the updated version of the Delphi Firemonkey Drawing App Demo
Update: Download an updated version of this demo for Delphi 10 Berlin.
I am using this example very well in my application iOS and Android.
I wonder if there is some form of adptar this code a function to undo the last action or actions last .
I thank you
One way to do Undo may be to store each command in a TStringList and then to do an undo you delete the last command from the TStringList. Clear the paintbox and re-apply all of the commands again.
They could advise me on the best event to put the command stringlist