I may have uncovered a bug in FMX use of painting on TCanvas. It does not appear in android applications, but the bug shows up in Windows versions of the same app.
I have put both a FMX TPanel and a nested FMX TImage on my form such that all the centers are co-located. Below this I have an FMX button. I then created an OnPaint event that contains Paths that outline the panel and also the image as well as an if statement that draws a diagonal line across the Image if the button has been pushed.. The button's OnClick event calls the OnPaint event.
When the form is created, the system automatically calls the OnPaint. In both the windows app and the android app, all goes as expected: the panel and the image are outlined. But when the button is pushed in the android version, the result is as expected: both the panel and the image are outlined, they remain nested in the center of the form, and a diagonal is drawn across the image. However, in the windows version of the app with the same code, the clicking the button results in All Canvases' origin reverting back to the Form's origin, the upper left corner of the form.
A second bug, or perhaps just a difference in how windows processes FMX OnPaint events, the lines draw in windows persist, while in android, the canvas seems to be erased upon beginning an OnPaint.
I am using C++ Builder 10.3 Community Edition on a Windows 10 machine.
Can anyone tell me if this is normal or is this a bug in FireMonkey?
Note: I asked a question related to this about a week ago that shows kind of the result in windows but with slightly different code . SeeJohn H64053 TPaintBox Canvas Problems in FMX