Re: graphics!!



On Mon, 2006-05-08 at 22:27 +0300, Juhana Sadeharju wrote:
I think you may need to use a canvas. For example:
http://developer.gnome.org/doc/API/2.0/libgnomecanvas/index.html
http://www.dachaplin.dsl.pipex.com/goocanvas/

Do they have a graph widget? Or are they more primitive?

No. GTK only provides primitives.  There have been several graph widgets
implemented using GTK.  


I need such a widget in audio apps:
(1) Envelopes drawn over the audio waveform widget.
(2) Frequency response curves of multiple parametric filters
    drawn in one canvas.
(3) Control envelopes.

All of these things would need to be implemented using primitives.  GTK
is just a GUI toolkit, not a domain-specific toolbox.  Audacity (which
uses wxWidgets not GTK) implemented their own widgets for dealing with
waveform graphs and selections and things.


Much of the stuff what can be seen in VST plugins, in Absynth
(specially envelopes), Waves' plugins, etc. They look nice too
unlike what I most see here.

Does GTK canvases provide transparency? What programs uses the
canvases? I might want see how they look like.

There is no GTK canvas officially yet.  There are several
implementations of canvases for GTK including gnome-canvas, foo-canvas,
etc.  They vary in purpose and function.


With gtkglext/opengl all seems to be eventually simpler.
Multiple "widgets" can be combined by using suitable transparency
and depth coordinates. Decorations are done easily, e.g., by
modeling objects in 3D. But then I cannot use the GTK widgets
indistinctly. Interaction with the opengl objects comes a problem
as well, making it tempting to use, e.g., OSG (openscenegraph.org).
But that is a large software and written with C++, which could be
a problem if I want code in C.

How would GTK's Cairo integration help? If at all.

Using Cairo do do you drawing of wave forms, envelopes, etc is a good
idea if Cairo is fast enough to do what you need to.  Certainly it seems
to me that a waveform graph, envelopes, etc would be well-suited to a
vector-drawing API.


Juhana




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