Skip to content

Image canvas BeginScene problem #34

Open
@Halex10000

Description

@Halex10000

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions