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

void plot_window_draw_time ( Plot plot  ) 

Draw a time indicator in the upper left-hand corner of the plot.

plot The Plot where the time indicator should be drawn.

Definition at line 349 of file plot_area.c.

References _Plot::font, global_current_frame, global_display_mode, global_last_frame, global_time_list, _Plot::i_origin, _Plot::i_size, _Plot::j_origin, _Plot::j_size, _Plot::pixmap, _Plot::plot_area, and SHOW_ALL_MODE.

Referenced by all_windows_draw(), plot_window_display_all(), and plot_window_expose().

  gchar time_str[TIME_STR_MAX_SIZE];

  if (global_time_list == NULL)

   * In SHOW_ALL mode, display the time range.
  if (global_display_mode == SHOW_ALL_MODE)
    g_snprintf(time_str, TIME_STR_MAX_SIZE, "time = %g ... %g",
               g_array_index(global_time_list, gdouble, 0),
               g_array_index(global_time_list, gdouble, global_last_frame));
   * Otherwise only a single frame is being displayed, so show the time of the
   * current frame.
    g_snprintf(time_str, TIME_STR_MAX_SIZE, "time = %g",
               g_array_index(global_time_list, gdouble, global_current_frame));

  gdk_draw_rectangle(plot->pixmap, plot->plot_area->style->white_gc, TRUE,
                     plot->i_origin, 0, plot->i_origin+plot->i_size,

    (plot->pixmap, plot->font,
     plot->i_origin + LEGEND_WIDTH_PADDING, 
     plot->j_origin - plot->j_size - LEGEND_HEIGHT_PADDING,
     time_str, strlen(time_str));

Generated by  Doxygen 1.6.0   Back to index