Image canvas BeginScene problem
Hi, i tried drawing some graphics on an Image component without success. Calling BeginScene method returns me an error: Type Error: BeginScene called with invalid arguments. Error: Colud not find a method with compatible arguments.
Below is the code called on a onclick method of the form. The Image component is named ImageCanvas
def do_button_click(self, sender): self.ImageCanvas.Bitmap.LoadFromFile('canvas.png') myrect = RectF(50, 30, 150, 200) canvas = self.ImageCanvas.Bitmap.Canvas canvas.BeginScene() canvas.Stroke.Kind = 1; canvas.Stroke.Color = 0xFF00FF00; canvas.StrokeThickness = 4; canvas.DrawEllipse(myrect, 255); canvas.EndScene()
I tried several arguments without any success
Any suggestion?
Thank you
Regards
Alessandro
Hi @Halex10000,
like described in the following documentation, two parameters are expected as part of the FMX.Graphics.TCanvas.BeginScene. Check it out in the link below: https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Graphics.TCanvas.BeginScene
If you don't want to input this parameters, you can provide the None type.
Let me know if it works for you.
Hi Imbelo, thank you for the prompt answer.
I tried with canvas.BeginScene(None, None) but I received the same error as before.
Thanks
Alessandro
@Halex10000,
I will try to replicate this issue and bring you further details soon.
We reproduced your issue. We shall try to provide the fix soon.