unless you call g.clear() or clearRect for whole screen it is indeed strange to get whole screen. just note that with true parameter it still returns modified region bu then clears it so with next call you should get undefined. The idea is that you call it with true if it is the last time you are interested in that region so next time it will be empty. you call it with false if you are just interested in current state but won't do any action (like sending it to display) so it is still modified
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
unless you call g.clear() or clearRect for whole screen it is indeed strange to get whole screen. just note that with true parameter it still returns modified region bu then clears it so with next call you should get
undefined
. The idea is that you call it with true if it is the last time you are interested in that region so next time it will be empty. you call it with false if you are just interested in current state but won't do any action (like sending it to display) so it is still modified