fix note drawing in clip editor by adding MidiView::relative_position()

This commit is contained in:
Paul Davis 2025-01-10 10:31:42 -07:00
parent c82afe4cdc
commit e273ec06bb
3 changed files with 28 additions and 4 deletions

View file

@ -284,6 +284,15 @@ class MidiView : public virtual sigc::trackable, public LineMerger
ArdourCanvas::Rectangle *resize_rect;
};
/* Convert a position to a distance (origin+position) relative to the
* start of this MidiView.
*
* What this is relative to will depend on whether or not _show_source
* is true.
*/
Temporal::timecnt_t relative_position (Temporal::timepos_t const & p) const;
/** Snap a region relative pixel coordinate to pixel units.
* @param x a pixel coordinate relative to region start
* @param ensure_snap do not use magnetic snap (required for snap delta calculation)