- int next_y1 = (int)(center_pixel - highsample * mwindow->edl->local_session->zoom_y / 2);
- int next_y2 = (int)(center_pixel - lowsample * mwindow->edl->local_session->zoom_y / 2);
- if(next_y1 < 0) next_y1 = 0;
- if(next_y1 > canvas->get_h()) next_y1 = canvas->get_h();
- if(next_y2 < 0) next_y2 = 0;
- if(next_y2 > canvas->get_h()) next_y2 = canvas->get_h();
- if(next_y2 > center_pixel + mwindow->edl->local_session->zoom_y / 2 - 1)
- next_y2 = center_pixel + mwindow->edl->local_session->zoom_y / 2 - 1;
- if(next_y1 > center_pixel + mwindow->edl->local_session->zoom_y / 2 - 1)
- next_y1 = center_pixel + mwindow->edl->local_session->zoom_y / 2 - 1;
-
- int y1 = next_y1;
- int y2 = next_y2;
-
-
-
+
+ int y1 = (int)(center_pixel - highsample * zoom_y2);
+ int y2 = (int)(center_pixel - lowsample * zoom_y2);
+ CLAMP(y1, 0, max_y); int next_y1 = y1;
+ CLAMP(y2, 0, max_y); int next_y2 = y2;
+//printf("draw_line (%f,%f) = %d,%d, %d,%d\n", lowsample, highsample, x1 + x, y1, x1 + x, y2);