Gtk-plot Zoom

arne <[email protected]> Wed, 01 Oct 2008 20:01:58 +0200
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
Hello,

I am writing a small application which uses gtkplot to display some recorded data,
it is a kind of software oscilloscope,

you can see a screenshot here:

http://www.pagelnet.de/scope.png


At the moment I want to add a zoom-function with mouse support,
that means, that I want to mark a rectangle(like gimp etc.) with the mouse and then zoom into the plot.

The biggest problem for me is drawing a rectangle with the mouse in the gtkplot and getting the 
positions of the rectangle.

What is the best way to do this?

Must I get the pointer-position and then always use gtk_plot_draw_line() to mark a rectangle?


When I have the start and end-position of the marked rectangle related to my plot the zoom function 
itself should be no problem.

Best regards
   Arne



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/