X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=3b1d0ac8a05913895fb5aa0d6f78cc6ae38c9052;hb=11b3a0bebdfdfe15ca2985624244fd1acd978fe4;hp=d8c09e055692e8b0587fb9d7dc9f106dfe21337c;hpb=17b4e5a06157865391c2d07b552b81d84665bcae;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index d8c09e05..3b1d0ac8 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -1082,19 +1082,27 @@ void CWindowCanvas::draw_refresh(int flush) in_x2 > in_x1 && in_y2 > in_y1) { +// input scaled from session to refresh frame coordinates + int ow = get_output_w(mwindow->edl); + int oh = get_output_h(mwindow->edl); + int rw = refresh_frame->get_w(); + int rh = refresh_frame->get_h(); + float xs = (float)rw / ow; + float ys = (float)rh / oh; + in_x1 *= xs; in_x2 *= xs; + in_y1 *= ys; in_y2 *= ys; // Can't use OpenGL here because it is called asynchronously of the // playback operation. get_canvas()->draw_vframe(refresh_frame, (int)out_x1, (int)out_y1, (int)(out_x2 - out_x1), - (int)(out_y2 - out_y1)); -// if refresh_frame session geometry... -// (int)in_x1, -// (int)in_y1, -// (int)(in_x2 - in_x1), -// (int)(in_y2 - in_y1), -// 0); + (int)(out_y2 - out_y1), + (int)in_x1, + (int)in_y1, + (int)(in_x2 - in_x1), + (int)(in_y2 - in_y1), + 0); } } else