[fxruby-users] Extending fxruby with c++ operating on an FXImage?

Paul Melis p.e.c.melis at rug.nl
Tue May 3 08:58:44 EDT 2005


Hello,

I'm currently doing a little app that works on images and corrects lens 
distortion. It is fully written in c++ using fox (1.4), but I'm 
interested in converting it to ruby+fxruby. However, the c++ code that 
does the actual work on the images will need to stay c++, for 
performance reasons. It currently isn't too speedy, so converting that 
part to ruby too will make it to slow to use.

The image processing actually works on an input FXImage object and 
outputs a new processed one. I'm wondering how easy it would be to 
create a ruby extension that interfaces with the processing code while 
still allowing the newly created FXImage's to be used by fxruby (as I 
want to display the results obviously). Will a simple swig interface 
definition for a c++ function like

FXImage* processImage(const FXImage* img, <processing parameters>);

be enough or does fxruby do more tricks underwater that I would need to 
duplicate?

Thanks in advance,
Paul


More information about the fxruby-users mailing list