A question about paintoval message to the lcd object

    Dec 24 2011 | 1:08 am
    I was just watching a rather good video about the workings of the new dict object but was baffled by how the paintoval message worked. In particular, when multiple paintoval messages were sent with different values, why did a new oval not appear (and what if in fact you wanted multiple ovals?)
    There's clearly some hidden state being kept around so that the "old" oval is erased first. Where is that?

    • Dec 24 2011 | 3:14 am
    • Dec 24 2011 | 9:22 am
      Duh....I missed that. But clearing the entire canvas every time is a very heavy handed mechanism which of course won't work if you want multiple objects. I thought that there might have been some "sprite" stuff going on that was just being glossed over as the tutorial was really about dict.
      But thanks for pointing out what was happening.
    • Dec 24 2011 | 4:39 pm
      You're right that sprites would be a good way to handle such drawing if you have many moving objects to draw. (However, the Jitter equivalent, jit.lcd, does not support sprites; there you have to keep track of objects on your own.)