comparison src/DLD-FUNCTIONS/__init_fltk__.cc @ 14314:17de694961f5

make panning work for logscale axes * graphics.cc (do_translate): New static function.: * graphics.cc, graphics.h.in (axes::properties): Use it. Args are now beginning and ending coordinates, not deltas. * __init_fltk__.cc (plot_window::handle): Pass beginning and ending * coordinates to translate_view, not deltas.
author John W. Eaton <jwe@octave.org>
date Thu, 02 Feb 2012 12:04:21 -0500
parents 358b59706656
children e7c74f56cd03
comparison
equal deleted inserted replaced
14313:7a7ce92cff56 14314:17de694961f5
1299 Matrix pos = fp.get_position ().matrix_value (); 1299 Matrix pos = fp.get_position ().matrix_value ();
1300 pixel2pos (ax_obj, pos_x, pos_y, x0, y0); 1300 pixel2pos (ax_obj, pos_x, pos_y, x0, y0);
1301 pixel2pos (ax_obj, Fl::event_x (), Fl::event_y (), x1, y1); 1301 pixel2pos (ax_obj, Fl::event_x (), Fl::event_y (), x1, y1);
1302 1302
1303 if (gui_mode == pan_zoom) 1303 if (gui_mode == pan_zoom)
1304 ap.translate_view (x0 - x1, y0 - y1); 1304 ap.translate_view (x0, x1, y0, y1);
1305 else if (gui_mode == rotate_zoom) 1305 else if (gui_mode == rotate_zoom)
1306 { 1306 {
1307 double daz, del; 1307 double daz, del;
1308 daz = (Fl::event_x () - pos_x) / pos(2) * 360; 1308 daz = (Fl::event_x () - pos_x) / pos(2) * 360;
1309 del = (Fl::event_y () - pos_y) / pos(3) * 360; 1309 del = (Fl::event_y () - pos_y) / pos(3) * 360;