Re: [gtk-list] Graphics Context & Drawing with Gdk?



Trevor.Jackson@dsto.defence.gov.au writes:

> As part of a project I'm currently working on I need to display a
> small plot of signal. I've managed to create a window with a drawing 
> area, off screen pixmap etc. What I want to do is draw some axes and 
> labels in one color and plot the data in a another color. 

Another option is to embed a plotutils widget in your GTK widget.  I
can probably dig up some code if needed.  You can get plotutils from
ftp.gnu.org/pub/gnu.  It's mostly designed for rendering static plots
to screen, postscript, fig, tek, etc., but it has some support for
incremental rendering of incoming data.

Right now, you can't put a full blown graph into an Xdrawable (it has
to come up in a separate window via the "graph" process, but support
for embedded graphs should be coming.  Currently you *can* use its
lower level drawing primitives (that are pretty powerful) to draw to
an arbitrary Xdrawable.

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30



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