Forums > MaxMSP

A question about paintoval message to the lcd object

December 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?

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


December 24, 2011 | 3:14 am

13:56


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


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

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


Viewing 4 posts - 1 through 4 (of 4 total)