if(width < 0) return ;
if(height < 0) return ;
- if(drawing->gc == NULL) {
- drawing->gc = gdk_gc_new(drawing->drawing_area->window);
- gdk_gc_copy(drawing->gc, drawing->drawing_area->style->black_gc);
- }
-
-
Tab *tab = drawing->control_flow_data->tab;
TimeWindow time_window =
lttvwindow_get_time_window(tab);
guint x = (guint)user_data;
hashed_process_data->x.over = x;
+ hashed_process_data->x.over_used = FALSE;
+ hashed_process_data->x.over_marked = FALSE;
hashed_process_data->x.middle = x;
+ hashed_process_data->x.middle_used = FALSE;
+ hashed_process_data->x.middle_marked = FALSE;
hashed_process_data->x.under = x;
+ hashed_process_data->x.under_used = FALSE;
+ hashed_process_data->x.under_marked = FALSE;
return;
}
(ControlFlowData*)g_object_get_data(
G_OBJECT(widget),
"control_flow_data");
+ if(drawing->gc == NULL) {
+ drawing->gc = gdk_gc_new(drawing->drawing_area->window);
+ gdk_gc_copy(drawing->gc, drawing->drawing_area->style->black_gc);
+ }
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
LttTime *time)
{
LttTime window_time_interval;
- guint64 time_ll;
+ double time_d;
window_time_interval = ltt_time_sub(window_time_end,
window_time_begin);
- time_ll = ltt_time_to_uint64(window_time_interval);
- time_ll = time_ll * x / width;
- *time = ltt_time_from_uint64(time_ll);
+ time_d = ltt_time_to_double(window_time_interval);
+ time_d = time_d / (double)width * (double)x;
+ *time = ltt_time_from_double(time_d);
*time = ltt_time_add(window_time_begin, *time);
}
guint *x)
{
LttTime window_time_interval;
- guint64 time_ll, interval_ll;
-
+ 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);
- time_ll = ltt_time_to_uint64(time);
- interval_ll = ltt_time_to_uint64(window_time_interval);
+ time_d = ltt_time_to_double(time);
+ interval_d = ltt_time_to_double(window_time_interval);
- if(interval_ll == 0) {
- g_assert(time_ll == 0);
+ if(interval_d == 0.0) {
+ g_assert(time_d == 0.0);
*x = 0;
} else {
- *x = (guint)(time_ll * width / interval_ll);
+ *x = (guint)(time_d / interval_d * (double)width);
}
}