A question about paintoval message to the lcd object

Dec 24, 2011 at 1:08am

A question about paintoval message to the lcd object

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?

(http://www.google.com/url?sa=t&rct=j&q=max%20msp%20how%20to%20use%20dict&source=web&cd=8&ved=0CF0QtwIwBw&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMqUNSJS_8kY&ei=bSD1TpbSL8m1hAegrtWZAQ&usg=AFQjCNGS62EtWRgYnFdA7vEYPk7UUZkCyA)

#60837
Dec 24, 2011 at 3:14am

13:56

#219054
Dec 24, 2011 at 9:22am

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.

#219055
Dec 24, 2011 at 4:39pm

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.)

Here’s a bit on sprites in lcd:
http://music.arts.uci.edu/dobrian/IAP2010/examples.htm#Ex40

#219056

You must be logged in to reply to this topic.