- float cursor_x = cx, cursor_y = cy;
- canvas->canvas_to_output(mwindow->edl, 0, cursor_x, cursor_y);
- int64_t position = plugin->get_source_position();
- float projector_x, projector_y, projector_z;
- Track *track = plugin->server->plugin->track;
- int track_w = track->track_w, track_h = track->track_h;
- track->automation->get_projector(
- &projector_x, &projector_y, &projector_z,
- position, PLAY_FORWARD);
- projector_x += mwindow->edl->session->output_w / 2;
- projector_y += mwindow->edl->session->output_h / 2;
- float output_x = (cursor_x - projector_x) / projector_z + track_w / 2;
- float output_y = (cursor_y - projector_y) / projector_z + track_h / 2;
- point_x->update((int64_t)(output_x));
- point_y->update((int64_t)(output_y));
+ float track_x, track_y;
+ canvas->canvas_to_output(mwindow->edl, 0, output_x, output_y);
+ plugin->output_to_track(output_x, output_y, track_x, track_y);
+ point_x->update((int64_t)track_x);
+ point_y->update((int64_t)track_y);