- if( do_camera ) {
- track->automation->get_camera(¢er_x,
- ¢er_y, ¢er_z, position, PLAY_FORWARD);
-// follow image, not camera
- center_x = -center_x; center_y = -center_y;
- }
- else
- track->automation->get_projector(¢er_x,
- ¢er_y, ¢er_z, position, PLAY_FORWARD);
-
-// center_x += track->track_w / 2;
-// center_y += track->track_h / 2;
- center_x += mwindow->edl->session->output_w / 2;
- center_y += mwindow->edl->session->output_h / 2;
- float track_x1 = center_x - track->track_w / 2 * center_z;
- float track_y1 = center_y - track->track_h / 2 * center_z;
- float track_x2 = track_x1 + track->track_w * center_z;
- float track_y2 = track_y1 + track->track_h * center_z;
-
- output_to_canvas(mwindow->edl, 0, track_x1, track_y1);
- output_to_canvas(mwindow->edl, 0, track_x2, track_y2);
+ track->automation->get_projector(&proj_x, &proj_y, &proj_z,
+ position, PLAY_FORWARD);
+
+ proj_x += mwindow->edl->session->output_w/2.;
+ proj_y += mwindow->edl->session->output_h/2.;
+ float proj_x1 = proj_x - track->track_w/2. * proj_z;
+ float proj_y1 = proj_y - track->track_h/2. * proj_z;
+ float proj_x2 = proj_x + track->track_w/2. * proj_z;
+ float proj_y2 = proj_y + track->track_h/2. * proj_z;
+ float x1 = proj_x1, x2 = proj_x2;
+ float y1 = proj_y1, y2 = proj_y2;
+ output_to_canvas(mwindow->edl, 0, x1, y1);
+ output_to_canvas(mwindow->edl, 0, x2, y2);