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

void Graph::zoom ( double  factor ) [virtual]

zoom graph with factor

Definition at line 1009 of file graph.cc.

{
  // don't zoom to wide
  if (factor < 1 && span*factor < width()) return;

  time_t time_center = data_end - span / 2;  
  if (time_center < 0) return;
  span *= factor;
  start = time_center - (span / 2);

  const time_t now = time(0);
  if (start + span > now + span * 2 / 3 )
    start = now - span / 3;

  if (autoUpdateTimer != -1) {
    timer_diff = 0.99 * span;
    start = time(0) - timer_diff;
  }
  
  data_is_valid = false;
  update();
}

Generated by  Doxygen 1.6.0   Back to index