On 08.08.2010, at 17:55, Shai Ayal wrote: >>> I'm using fltk to draw figures for GNU Octave, using OpenGL. I also >>> need to produce "hardcopy" (i.e. a postscript file) of the figure. I >>> do this by using the gl2ps library. I need to redraw to get the file, >>> and this has to be done even if fltk does not think it really has to >>> redraw. >> >> Which FLTK version are you using? FLTK 1.3 can do this for you with >> its new Fl_Printer, Fl_PostScript_Printer, and Fl_PostScript_File_Device >> features. However, AFAICT, this would also only work for shown and >> fully visible GL windows. > > I'm using FLTK 1.1. I'm not familiar with the FLTK 1.3 printing > services. Will they print a vector file or just a bitmap?
FLTK 1.3 has new device support that can be used to do printing as well as drawing on different devices, so that you could also use completely different rendering engines, for instance Cairo. Currently implemented devices for printing are: Windows GDI, Mac OS X (Carbon and/or Cocoa, whatever it is called), and PostScript. FLTK uses whatever is appropriate for its own drawing primitives, so (to answer your question) this would be vector drawing and bitmaps (for images). But there's one essential difference: FLTK can't use GL drawing to do this directly, and thus all GL windows are "printed" by reading the screen pixels back (glReadPixels) and writing an image (bitmap) to the output device (or PS file). Thus, FLTK 1.3 won't work with hidden GL windows as well (unless I'm missing something). Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

