convert_pixels_to_time(drawing->width, x,
time_window.start_time,
+ time_window.time_width,
window_end,
&start);
convert_pixels_to_time(drawing->width, x+width,
time_window.start_time,
+ time_window.time_width,
window_end,
&time_end);
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
events_request->start_time,
width,
#if 0
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
window_end,
cfd->drawing->last_start,
drawing->width,
#endif //0
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
window_end,
end_time,
drawing->width,
/* Draw the dotted lines */
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
window_end,
current_time,
drawing->width,
convert_pixels_to_time(drawing->width, (guint)event->x,
time_window.start_time,
+ time_window.time_width,
window_end,
&time);
gint width,
guint x,
LttTime window_time_begin,
+ LttTime window_time_interval,
LttTime window_time_end,
LttTime *time)
{
- LttTime window_time_interval;
double time_d;
- window_time_interval = ltt_time_sub(window_time_end,
- window_time_begin);
time_d = ltt_time_to_double(window_time_interval);
time_d = time_d / (double)width * (double)x;
*time = ltt_time_from_double(time_d);
__inline void convert_time_to_pixels(
LttTime window_time_begin,
+ LttTime window_time_interval,
LttTime window_time_end,
LttTime time,
int width,
guint *x)
{
- LttTime window_time_interval;
double time_d, interval_d;
#ifdef EXTRA_CHECK
g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
ltt_time_compare(window_time_end, time) >= 0);
#endif //EXTRA_CHECK
- window_time_interval = ltt_time_sub(window_time_end,window_time_begin);
time = ltt_time_sub(time, window_time_begin);