Hi,
I'm currently developing a Pure Data external to display music scores based on the Guido Engine (see the GuidoEngine project at http://guidolib.sourceforge.net). Actually, the Guido engine makes use of its own graphic device abstraction, build on top of Cairo on Linux, Quartz on Mac OS X, GDI or GDI+ on windows. It supports also a Qt based device... I've already identified the t_widgetbehavior struct to be notified of my object's lifetime events (although the role of the different fields is not always clear to me). But the question is how can I access to a native graphic context? Another solution could be to draw offscreen and to copy the bitmap data to a pd bitmap provided that such functionality exists?
-- Dominique
Pd's GUI is written in Tcl/Tk, so you'll need to find a Tk widget that allows you to write to it. I think if you want to write bitmaps, then you should look at the Tk 'photo' widget. You would probably then send the bitmap data via shared memory or a socket.
http://tcl.tk/man/tcl8.4/TkCmd/photo.htm
There is a rough Pd external based on the photo widget if you want an example. But it uses the 0.43 tcl command 'pdsend' rather than the old version which was just called 'pd'. Another example is pix_preview in pdvjtools.
https://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/tkwid... http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/pdvjto...
.hc
On Sep 8, 2010, at 10:16 AM, Dominique Fober wrote:
Hi,
I'm currently developing a Pure Data external to display music scores based on the Guido Engine (see the GuidoEngine project at http://guidolib.sourceforge.net ). Actually, the Guido engine makes use of its own graphic device abstraction, build on top of Cairo on Linux, Quartz on Mac OS X, GDI or GDI+ on windows. It supports also a Qt based device... I've already identified the t_widgetbehavior struct to be notified of my object's lifetime events (although the role of the different fields is not always clear to me). But the question is how can I access to a native graphic context? Another solution could be to draw offscreen and to copy the bitmap data to a pd bitmap provided that such functionality exists?
-- Dominique
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
----------------------------------------------------------------------------
"We have nothing to fear from love and commitment." - New York Senator Diane Savino, trying to convince the NY Senate to pass a gay marriage bill