Re: [gtk-list] Re: Drawing area question




On 5 Jul 1998, Trond Eivind Glomsrød wrote:

> I've been thinking about making some small visualization programs
> myself, combining OpenGL and gtk+. For this to be useful (to me,
> anyway), some means of getting postscript output (or preferably,
> encapsulated postscript) as well.
> 
> Does Gtk+ support printing of drawing areas? Any hints?
> -- 
> Trond Eivind Glomsrød
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

The drawing area gives you a very low level interface for graphics
visualization programs, its seems similar to the Motif drawing area. You
have to handle coordinate transforms and (maybe double) buffering by
yourself.  IMO chap. 20 in the GTK-tutorial and chap. 10 in O'Reilly's
Motif Programming Manual have a good intro. 

If you are interested in vector graphics you may consider connecting the
GNU graphics library xwindow plotter to the window of a drawing area.  The
library handles buffering and has an easy to use interface which
simplifies the use of color, lineytypes etc. Besides this it supports a
lot of output formats (idraw editable postscript, fig, ...). For more info
see the homepage at
<http://www.gnu.org/software/plotutils/plotutils.html>. 

The same should work with the Mesa library. It supports ppm output, which
can be easily transformed to ps-bitmaps. If you want to design your own
opengl widget the interface definition of Troll Techs opengl-widget may be
a good start. 

I still don't know about problems of mixing Xt-based libraries with GTK. 
If someone has more experience I would like to hear.  
-- 
Peter Schoefer




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]