I thought it would be more applicable if getModified(true) would be set to "nothing is modified, so nothing needs to be cleared" { x1: 0, y1: 0, x2: 0, y2: 0}. Or ....... it would be set to undefined, that's logical to me too.
It is... It is set to undefined.
It would be clearer for me if you gave an example of what isn't working as you expect.
As @fanoush said, most likely what's happening is you're clearing the whole screen with g.clear() as in my example above. As expected that changes the contents of the whole screen, so you see { x1: 0, y1: 0, x2: 239, y2: 239 }
I guess it's possible that g.reset() resets the modified area too, which might be tripping you up?
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.
It is... It is set to
undefined
.It would be clearer for me if you gave an example of what isn't working as you expect.
As @fanoush said, most likely what's happening is you're clearing the whole screen with
g.clear()
as in my example above. As expected that changes the contents of the whole screen, so you see{ x1: 0, y1: 0, x2: 239, y2: 239 }
I guess it's possible that
g.reset()
resets the modified area too, which might be tripping you up?