20 if (_time_width != time_width) {
21 _time_width = time_width;
41 return (
int)((double)_xsize * (time - _start_time) / _time_width);
49 return _time_width * (double)x / (
double)_xsize + _start_time;
58 return (
int)((double)_xsize * value / _time_width);
67 return _time_width * (double)x / (
double)_xsize;
int timestamp_to_pixel(double time) const
Converts a timestamp to a horizontal pixel offset.
double get_horizontal_scale() const
Returns the amount of total time the width of the horizontal axis represents.
int height_to_pixel(double value) const
Converts a value (i.e.
double pixel_to_timestamp(int x) const
Converts a horizontal pixel offset to a timestamp.
void set_horizontal_scale(double time_width)
Changes the amount of time the width of the horizontal axis represents.
double pixel_to_height(int y) const
Converts a horizontal pixel offset to a value (a "height" in the strip chart).