summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-16 12:15:55 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-16 12:15:55 +0000
commit25ac475e4654e386b03ec35c994aba6bb1d739ef (patch)
treede44b8c9125b0c173c6d2702d2f87347e46e0adb
parent797648ddcfe72bb428d8355672da3a1b6fac54fc (diff)
Plot reel split points in the timeline.
-rw-r--r--src/wx/timeline_content_view.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc
index 13575b280..001b4077a 100644
--- a/src/wx/timeline_content_view.cc
+++ b/src/wx/timeline_content_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
#include "wx_util.h"
#include "lib/content.h"
#include <wx/graphics.h>
+#include <boost/foreach.hpp>
using boost::shared_ptr;
@@ -112,6 +113,7 @@ TimelineContentView::do_paint (wxGraphicsContext* gc)
gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (background_colour(), wxBRUSHSTYLE_SOLID));
}
+ /* Outline */
wxGraphicsPath path = gc->CreatePath ();
path.MoveToPoint (time_x (position) + 1, y_pos (_track.get()) + 4);
path.AddLineToPoint (time_x (position + len) - 1, y_pos (_track.get()) + 4);
@@ -121,6 +123,16 @@ TimelineContentView::do_paint (wxGraphicsContext* gc)
gc->StrokePath (path);
gc->FillPath (path);
+ /* Reel split points */
+ gc->SetPen (*wxThePenList->FindOrCreatePen (foreground_colour(), 1, wxPENSTYLE_DOT));
+ BOOST_FOREACH (DCPTime i, cont->reel_split_points ()) {
+ path = gc->CreatePath ();
+ path.MoveToPoint (time_x (i - position), y_pos (_track.get()) + 4);
+ path.AddLineToPoint (time_x (i - position), y_pos (_track.get() + 1) - 4);
+ gc->StrokePath (path);
+ }
+
+ /* Label text */
wxString name = std_to_wx (cont->summary());
wxDouble name_width;
wxDouble name_height;