----- Original Message ----- > From: Ivica Ico Bukvic <[email protected]> > To: 'Jonathan Wilkes' <[email protected]> > Cc: [email protected] > Sent: Saturday, April 6, 2013 9:56 PM > Subject: RE: [PD] Drawing a sine function dynamically in Gem > > You may want to investigate latest version of pd-l2ork that also includes > ability to assign different font sizes to drawnumber and drawsymbol > (optional last argument, can be assigned to a variable but currently only > supports pd-defined font sizes). It also separates the two into two distinct > externals so that when you do the help on drawsymbol you don't end-up with > drawnumber help file. I don't have a help file amended yet. It would be > great if this ended up in the core documentation project.
Sounds good. Another one I'm working on: 1) Did the user click a graph? 2) If so, is there either a) a single garray or b) a single data structure array with a single "float y" field in its template that is contained within the graph's gl_list? 3) If so, does the horizontal position of the mouse-click lie within the horizontal bounds of an element of the garray or ds array we found in the gl_list? 4) If so, set the "y" value of the array element to the "y" position of the mouse click. This should allow "jump on click" for "Put" menu arrays-- something mentioned in another thread recently, as well as easy "jump on click" data structure multisliders. Also-- I don't think it'd be too hard to add [drawimage ./foo.gif]. It's a little trickier because you have to remember to remove the tk photo when the object is destroyed to prevent memory leaks. Also, it'd be nice to have an -s flag so you can load a sequence of images with something like [drawimage -s blah ./foo%d.gif]. The idea is that this object would tell the gui to load foo01.gif foo02.gif etc. into memory and display whichever image for which %d matches the value of "foo". Then you could easily animate sprites on a canvas! The nice thing is that pd would just be passing an itemconfigure message with an image name to the gui, so it should be way more efficient than sending array data or deleting/creating polygon coords. -Jonathan > >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] On Behalf Of >> Jonathan Wilkes >> Sent: Thursday, April 04, 2013 5:36 PM >> To: Orm Finnendahl; [email protected] >> Subject: Re: [PD] Drawing a sine function dynamically in Gem >> >> Btw-- I just uploaded a patch that adds [drawoval], [filledoval], >> [drawrectangle], and [filledrectangle] to data structure >> drawing instructions. This way you can just specify a pair >> of bounding box coords and let tk draw the circle, rather than >> simulating one with a polygon with lots of sides. :) >> >> -Jonathan >> >> >> >> ----- Original Message ----- >> > From: Orm Finnendahl <[email protected]> >> > To: [email protected] >> > Cc: >> > Sent: Wednesday, April 3, 2013 12:01 PM >> > Subject: Re: [PD] Drawing a sine function dynamically in Gem >> > >> > Hi Alexandros, >> > >> > attached is an example to do this with vanilla pd using datastructs >> > instead of GEM. >> > >> > You'll have to save both files (sine-wave-sub.pd and sine-wave.pd) >> > under these names in the same folder and open up sine-wave.pd. The >> > animation should start right away... >> > >> > Is that what you were looking for? >> > >> > -- >> > Orm >> > >> > _______________________________________________ >> > [email protected] mailing list >> > UNSUBSCRIBE and account-management -> >> > http://lists.puredata.info/listinfo/pd-list >> > >> >> _______________________________________________ >> [email protected] mailing list >> UNSUBSCRIBE and account-management -> >> http://lists.puredata.info/listinfo/pd-list > _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
