height = std::max (y + height, other.y + other.height) - y;
}
+ Rect<T> extended (T amount) const {
+ Rect<T> c = *this;
+ c.x -= amount;
+ c.y -= amount;
+ c.width += amount * 2;
+ c.height += amount * 2;
+ return c;
+ }
+
bool contains (Position<T> p) const
{
return (p.x >= x && p.x <= (x + width) && p.y >= y && p.y <= (y + height));
}
return dcpomatic::Rect<int> (
- time_x (content->position ()) - 8,
- y_pos (_track.get()) - 8,
- content->length_after_trim().seconds() * _timeline.pixels_per_second().get_value_or(0) + 16,
- _timeline.track_height() + 16
+ time_x (content->position ()),
+ y_pos (_track.get()),
+ content->length_after_trim().seconds() * _timeline.pixels_per_second().get_value_or(0),
+ _timeline.track_height()
);
}
void
TimelineView::force_redraw ()
{
- _timeline.force_redraw (_last_paint_bbox);
- _timeline.force_redraw (bbox ());
+ _timeline.force_redraw (_last_paint_bbox.extended (4));
+ _timeline.force_redraw (bbox().extended (4));
}
int