C++ Code Documentation


Derived from: imagegl::PostscriptBase

Children: isight::context::Write

File: GEOM/imagegl/Postscript.H

This library prints OpenGL images in PostScript format. It produces high-quality rescalable vector/polygon graphics, not geom/bitmap graphics. It works using the OpenGL feedback mechanism.

This library is divided into three classes:

class PostScript - PostScript part of the implementation
class PostscriptBase - OpenGL part of the implementation

Use the library like this:
(1) create a PostScript instance X
(2) call X->set_ostream(o)
(2) in your imagegl draw handler method, render the object with OpenGL commands between calls X->begin() and X->end()

The library works by sorting the polygons by depth. It does not cull hidden polygons.

See also
(3) geomview

Class PostscriptBase is the OpenGL part of the OpenGL-to-PostScript library. Class PostScript is the PostScript part of the OpenGL-to-PostScript library.

Acknowledgements: This code is modified from GLP, an OpenGL to Postscript class library by Michael Sweet. .

  • PostScript() throw();
    void constructor
  • ~PostScript() throw();
  • void write( ::io::Ostream &o, bool EPS );
  • virtual void draw() = 0;
  • virtual void begin_() throw( ::io::WriteException );
    begin_(), end_() performs the PostScript side of the conversion
  • virtual void end_() throw( ::io::WriteException );
    write list of elements in PostScript form write postscript trailer
  • int _page_count;
  • ::io::Ostream *_ostream;
    Page count
  • int _status;
    Output file
  • void write_postscript_header( ::io::Ostream &o ) throw( ::io::WriteException );
  • bool _EPS;
  • PostScript( PostScript const & ) throw();
    disabled copy constructor
  • PostScript &operator=( PostScript const & ) throw();
    disabled assignment operator

imagegl::PostScript GANG