Re: how to draw curves
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: how to draw curves
- Date: Mon, 28 May 2007 10:38:15 +0200
On Mon, May 28, 2007 at 04:12:54PM +0800, dashikugua 126 com wrote:
> My application is using gtk to design the GUI for an Arbitrary/Function Generator. So I need to draw lots of curves, including sine wave, ramp wave, pulse wave, noise wave......and their modulation waves, e.g. the AM, FM, PM, FSK and so on.
> My problem is that I haven't found a good method to draw these waves. I have used GDK to draw sine wave on the GtkDrawingArea. But I found this method is a little complicated especially when I draw the modulation waves. Is there a good way to draw curves ?
> Any help would be appreciated.Thanks
Drawing graphs was dicussed a few days ago:
http://mail.gnome.org/archives/gtk-list/2007-May/msg00170.html
However, I'd suggest to just create a Cairo path and draw it,
I'm not sure what is the problem though, you have to
generate some set of points discretizing the curve no matter
what method you use to draw -- and once you have such set,
it should be easy to draw the curve using any method, even
gdk_draw_lines().
Yeti
--
http://gwyddion.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]