remove / from shift drop filter, corrent alpha calculation in overlaysample
[goodguy/history.git] / cinelerra-5.1 / cinelerra / cwindowgui.C
index eca6fad0f7011b86062779705592d89950d1b640..3e980b8b99308e7d89c99de872db4bc413af10cd 100644 (file)
@@ -1082,6 +1082,15 @@ 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,
@@ -2978,8 +2987,13 @@ int CWindowCanvas::test_bezier(int button_press,
                        {
                                last_center_x = gui->affected_x->get_value();
                                last_center_y = gui->affected_y->get_value();
-                               float x = gui->center_x + cursor_x - gui->x_origin;
-                               float y = gui->center_y + cursor_y - gui->y_origin;
+                               float dx = cursor_x - gui->x_origin;
+                               float dy = cursor_y - gui->y_origin;
+                               if(gui->current_operation == CWINDOW_CAMERA ) {
+                                       dx = -dx;  dy = -dy;
+                               }
+                               float x = gui->center_x + dx;
+                               float y = gui->center_y + dy;
                                gui->affected_x->set_value(x);
                                gui->affected_y->set_value(y);
                                if( !EQUIV(last_center_x, x) || !EQUIV(last_center_y, y) )