Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image canvas BeginScene problem #34

Open
Halex10000 opened this issue Jun 3, 2022 · 4 comments
Open

Image canvas BeginScene problem #34

Halex10000 opened this issue Jun 3, 2022 · 4 comments
Assignees
Labels

Comments

@Halex10000
Copy link

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

@lmbelo lmbelo self-assigned this Jun 3, 2022
@lmbelo
Copy link
Member

lmbelo commented Jun 3, 2022

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.

@lmbelo lmbelo added the Awaiting Feedback Waiting for feedback from submitter or others. label Jun 3, 2022
@Halex10000
Copy link
Author

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

@lmbelo
Copy link
Member

lmbelo commented Jun 3, 2022

@Halex10000,

I will try to replicate this issue and bring you further details soon.

@lmbelo lmbelo added pending and removed Awaiting Feedback Waiting for feedback from submitter or others. labels Jun 3, 2022
@Priyatham10 Priyatham10 self-assigned this Aug 24, 2022
@Priyatham10
Copy link
Member

We reproduced your issue. We shall try to provide the fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants