[Rcpp-devel] c++ graphics device
Romain Francois
romain at r-enthusiasts.com
Fri Mar 26 07:44:36 CET 2010
Hello,
R's graphics device drivers are currently written using poor man's c++:
you are supposed to create a pDevDesc struct (defined in
R_ext/GraphicsDevice.h) and then fill it with function pointers, e.g
(from the NULL device) :
/*
* Device functions
*/
dev->close = NULL_Close;
dev->activate = NULL_Activate;
dev->deactivate = NULL_Deactivate;
dev->size = NULL_Size;
I'd like (not now, but sometime) to encapsulate this into C++ so that
writing a device would more naturally be done by deriving some class
rather than the pseudo c++ done in C implementation.
I believe this could help people implement other graphics devices using
c++ idioms.
Should this go into Rcpp (I think I prefer this option) or should it be
some other package (RcppGD, or something).
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7
`- http://tr.im/O1wO : highlight 0.1-5
More information about the Rcpp-devel
mailing list