+
+/** Set the maximum time that points on this line can be at, relative
+ * to the start of the track or region that it is on.
+ */
+void
+AutomationLine::set_maximum_time (framecnt_t t)
+{
+ if (_maximum_time == t) {
+ return;
+ }
+
+ _maximum_time = t;
+ reset ();
+}
+
+
+/** @return min and max x positions of points that are in the list, in session frames */
+pair<framepos_t, framepos_t>
+AutomationLine::get_point_x_range () const
+{
+ pair<framepos_t, framepos_t> r (max_framepos, 0);
+
+ for (AutomationList::const_iterator i = the_list()->begin(); i != the_list()->end(); ++i) {
+ r.first = min (r.first, _time_converter.to ((*i)->when) + _offset + _time_converter.origin_b ());
+ r.second = max (r.second, _time_converter.to ((*i)->when) + _offset + _time_converter.origin_b ());
+ }
+
+ return r;
+}
+
+void
+AutomationLine::set_offset (framepos_t off)
+{
+ if (_offset == off) {
+ return;
+ }
+
+ _offset = off;
+ reset ();
+}