From: Rafael L. <lab...@ps...> - 2003-02-23 17:05:31
|
As you probably remember, Doug Hunt has develop the great PLplot bindings for PDL (Perl Data Language, see http://pdl.perl.org). In his package, there is also a object oriented module called PLplotOO: http://search.cpan.org/author/DHUNT/PDL-Graphics-PLplot-0.18/PLplotOO.pm It will be great to see this page: http://pdl.perl.org/demos/plot2D_en.html with PGPLOT replaced by PLplot! PLplotOO was writen for PLplot 5.1.0, but I succeeded to patch it for the current CVS sources. I will completely abandon the Perl5 bindings project that is currently in CVS. Doug's approach is far superior than mine and has the big advantage of being PDL-native. As a matter of fact, instead of the arcane SWIG interface that I developped for the Perl5 bindings, the PDL bindings use a PDL-specific interface based on a *.pd file. Much cleaner, much better. I will eventually package the PDL bindings for Debian, so that the PLplot suite will be complete for at least one Operational System in the Universe. Now, Doug told me that a forthcoming version of the PLplotOO module will need a feature that is present in his patched sources of PLplot: a new driver called "mem", which plots into a user-supplied memory space (X, Y, <R,G,B>). He send to me the source file mem.c and I integrated it into PLplot's source and configuration system. The only caveat is that this new driver needs the addition of a function to the API (in src/plcore.c), called plsmem: /* Set the memory area to be plotted (with the 'mem'driver) as the 'dev' member of the stream structure. Also set the number of pixels in the memory passed in in 'plotmem'. Plotmem is a block of memory maxy by maxx by 3 bytes long, say: 480 x 640 x 3 (Y, X, RGB) This memory will be freed by the user! */ void c_plsmem(PLINT maxx, PLINT maxy, void *plotmem) { plsc->dev = plotmem; plP_setphy (0, maxx, 0, maxy); } I have already a version here ready for cvs commit, including the addition of the documentation for plsmem in doc/docbook/api.xml. However, since this adds things to the API (notice that this does _not_ make the library backwards incompatible), I decided to ask your opinion before I do the actual commit. I do not see problems with the changes, besides the fact that a new API function is totally specific to the mem driver. If you do not care, or if you are silent (I promise to wait for a couple of hours, at least :-) I will cvs commit the changes. -- Rafael |