Preparing for Cairo?


I'm on the verge of beginning a development project with GTK+ that will 
span what I understand to be the timeframe for Cairo integration (gtk 2.8, 
mid 2005ish?). While some of my development will be based on traditional 
gtk widgets, I will also have a major component involved in drawing and 
responding to clicks on and around vector graphic shapes. Ultimately, I 
would like to be able to draw a diagram on the screen for a user to 
interact with and have buttons and other widgets overlayed on parts of the 
diagram. The diagram needs to be able to support zooming and panning as 
well as a number of other features.

So... given that cairo is on the way, how should regular developers best 
prepare for it? Presumably using gdk is now a bad idea, as is using libart 
directly. I've read fragmented snippets across a number of mailing list 
archives that suggest the gnome-canvas will eventually render to cairo and 
at that point would be moved into gtk as gtk-canvas. At present (as I 
understand it) the gnome-canvas can't support button and other gtk 
widgets. Will it be able to support them in its new form under Cairo?

Another alternative (as I understand it) would be to start using GtkCairo 
as the basis for a custom canvas. I imagine that that wouldn't help me get 
the button widgets in place on my scalable drawing, but may not inhibit 
it. However, if I can start using some canvas today that will both survive 
the cairo migration and begin to allow other widgets to be mixed in with 
its drawings I would be able to ride that wave without getting too 
involved with cairo primitives myself...

So, what to do? Is there any canvas object currently in existence that 
will fill the role I have for it (and preferrably be reintegrated into 
gtk) over the next 6-12 months? Which API should I code to, and what steps 
can I take to minimse rework if such a beast does not exist?


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