Hopefully there are much more effective methods from other people but:
You could start from pixel 1 to the last pixel and check the pixel color. If it is white it is empty, if not then it is filled.
I take the liberty of re-launching my question: how could I determine the percentage of fill of a canvas? And at the same time, display this percentage.
If you had copied the blocks as I posted, using the connector local variable, you could simply connect them to your Etiquette1.Texte block at the bottom.
Seems you are using a larger canvas now, @ 250x250 ? That is 62,500 pixels to count (as opposed to 2500 pixels with a 50x50 canvas), it takes time to do that…
So, for the idea of ​​the button, that’s perfect. I have a small amount of time but I imagine it’s normal the time it calculates the entire canvas area.
However, what I don’t understand is why I have 1% when the canvas is empty?
The text, I put it to 0.
I launch the app, click on the button, it calculates and it gives 1%.
I tried to change the number in the block (circled in the capture), putting 0, even if I filled the canvas it remains at 0%. I tried to put 5, and I got 3%.