summaryrefslogtreecommitdiff
path: root/src/wx/timeline_content_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-25 17:06:44 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-25 17:06:44 +0000
commitd2e8a683eed6fb82d4d255fffaf571ff27057132 (patch)
treebea3ed6db13ab6d5a72673aa2c30a55d9e188f03 /src/wx/timeline_content_view.cc
parent03356464b29ff84f72d252efb22502754f55cfce (diff)
Plot video and subtitle on one track and audio on the rest in the timeline.
Diffstat (limited to 'src/wx/timeline_content_view.cc')
-rw-r--r--src/wx/timeline_content_view.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc
index ed7e1d3d0..b520b5ceb 100644
--- a/src/wx/timeline_content_view.cc
+++ b/src/wx/timeline_content_view.cc
@@ -24,6 +24,7 @@
#include <wx/graphics.h>
#include <boost/foreach.hpp>
+using std::list;
using boost::shared_ptr;
TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c)
@@ -91,7 +92,7 @@ TimelineContentView::track () const
}
void
-TimelineContentView::do_paint (wxGraphicsContext* gc)
+TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> > overlaps)
{
DCPOMATIC_ASSERT (_track);
@@ -132,6 +133,12 @@ TimelineContentView::do_paint (wxGraphicsContext* gc)
gc->StrokePath (path);
}
+ /* Overlaps */
+ gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (foreground_colour(), wxBRUSHSTYLE_CROSSDIAG_HATCH));
+ for (list<dcpomatic::Rect<int> >::const_iterator i = overlaps.begin(); i != overlaps.end(); ++i) {
+ gc->DrawRectangle (i->x, i->y + 4, i->width, i->height - 8);
+ }
+
/* Label text */
wxString name = std_to_wx (cont->summary());
wxDouble name_width;