About gnome-canvas



For a project I'm working on, I'm currently writing a scientific
plotting library, using the gnome canvas. What I want to achieve is a
fast interactive screen output, with printing capabilities. 

It's something like GtkExtra, but I want to use the maximum of the gnome
libraries, like gnome-canvas and gnome-print, when Gtkextra implements
its own canvas and printing outpout.

My idea is to create specilized canvas items: one for the axis system,
one for each sort of plot, etc...

The problem is that gnome-canvas can not generate printing output. That
means either code duplication, or ugly hack to use the same code for
canvas item drawing and gnome-print function calls.

That could be implemented in gnome-canvas in two different ways:

- extend the backend concept already present in gnome-canvas (Xlib and
libart) to a wider one that includes printing output, and why not export
outputs (to vector or image file formats). That means, if you want a
screen output and a printing output, you have to create two diffrent
canvas.

- or add an additional print function to the gnome-canvas object, which
will call the draw member of each gnome-canvas-item whith appropriate
parameters.

I plan to try to implement one of this possibility.

Is this reasonable ? Or am I on crack ?

  Emmanuel.

 






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