Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void plot_area_zoom_finish ( Plot plot,
gint  x,
gint  y 

When the left-button is released, perform the zoom by resetting the ranges on the axes and redrawing the window.

plot The Plot to be zoomed.
x The x coordinate (pixels) of the final point.
y The y coordinate (pixels) of the final point.

Definition at line 549 of file plot_area.c.

References _Plot::fixed_range, plot_axes_create(), plot_window_display_all(), plot_window_reconfigure(), _Plot::x_range, _Plot::y_range, _Plot::zoom_history_end, _Plot::zoom_history_start, zoom_x_range_set(), _Plot::zoom_x_start, zoom_y_range_set(), and _Plot::zoom_y_start.

Referenced by plot_area_button_release_event().

  Point_Double tmp;
  zoom_x_range_set(plot, plot->zoom_x_start, x);
  zoom_y_range_set(plot, plot->zoom_y_start, y);

   * Flag the zoom starting point as being uninitialised to prevent spurious
   * zooms.
  plot->zoom_x_start = NO_ZOOM;
  plot->zoom_y_start = NO_ZOOM;

  plot->fixed_range = TRUE;

  if (!plot->zoom_history_start)
    plot->zoom_history_start=g_array_new(FALSE, FALSE, sizeof(Point_Double));
  tmp.x = plot->x_range[0];
  tmp.y = plot->y_range[0];
  g_array_append_val(plot->zoom_history_start, tmp);
  if (!plot->zoom_history_end)
    plot->zoom_history_end=g_array_new(FALSE, FALSE, sizeof(Point_Double));
  tmp.x = plot->x_range[1];
  tmp.y = plot->y_range[1];
  g_array_append_val(plot->zoom_history_end, tmp);



Generated by  Doxygen 1.6.0   Back to index