Canvas Areas

Have I missed something?

The “portion” parameters (x,y,width,height) in invalidate and refresh do not seem to be passed through to the paint event?

Easy example: Example Projects>Graphics and Mutimedia>Animation>CanvasAreas does not work.

They work here in windows 10 using 2021r3, what os and version are you using?

This is NOT a Xojo bug, it was broken in macOS Big Sur at the OS level.

The word from Apple is that the new behavior described in my original report should be considered the correct behavior, and that -getRectsBeingDrawn:count: can no longer be relied upon. The expectation of developers who need drawing optimization that they “roll their own” system.

I am MacOS and Xojo 2021 R3. I also tried Xojo 2020 R2.1 (the oldest I have) with the same result.

Thanks Sam.

Any ideas on how to “roll my own”. Setting flags etc leads to synch problems with event firing.

What I have found is that when calling invalidate( left, top, width, height, false ) the OS will only update that area to it’s buffers, so I just live without knowing what area should be painted.

However if you want to do it yourself, create a subclass, override the invalidate function (there are two AFAIK), add the rect to an array and then call super.invalidate passing in the area.

In the paint event, loop through the array (if it has values) and flush it once you’ve done your drawing.

Wow, I thought the point of using a framework like xojo was meant to insulate issues like this away from users?

Why is this not in the docs saying that this feature no longer works in Big Sur?

Why is xojo not working around this to make this “bug” transparent to its users?

If things like this aren’t addressed then xojo has a slow erosion of its feature set as well as a slow creep of features just not working as expected cross platform.

Thanks Sam.

1 Like

Probably because we didn’t know about this change.



I thought you and I had discussed this, but I can’t find any reference on the forum, so it musta been someone else.

The case has been reopened.

1 Like

Thanks for the example you placed in FB case 63577

T’was on back in February and I forgot that I’d logged it in Feedback.

Not defending Xojo here, but Apple also haven’t updated their documents or deprecated the function, it just doesn’t work, even though Apple’s engineers now claim that it not working is expected behavior.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.