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);
guint x;
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
window_end,
time,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
//convert_time_to_pixels(
// time_window->start_time,
+ // time_window.time_width,
// window_end,
// time,
// width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
guint new_x;
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
guint new_x;
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,
/* Same scale (scrolling) */
g_info("scrolling");
LttTime *ns = &new_time_window->start_time;
+ LttTime *nw = &new_time_window->time_width;
LttTime *os = &old_time_window->start_time;
+ LttTime *ow = &old_time_window->time_width;
LttTime old_end = old_time_window->end_time;
LttTime new_end = new_time_window->end_time;
//if(ns<os+w<ns+w)
guint width = control_flow_data->drawing->width;
convert_time_to_pixels(
*os,
+ *ow,
old_end,
*ns,
width,
guint width = control_flow_data->drawing->width;
convert_time_to_pixels(
*ns,
+ *nw,
new_end,
*os,
width,
convert_time_to_pixels(
time_window.start_time,
+ time_window.time_width,
end_time,
evtime,
width,