From: Carl Hetherington Date: Tue, 16 Feb 2016 12:15:55 +0000 (+0000) Subject: Plot reel split points in the timeline. X-Git-Tag: v2.6.23~21 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=25ac475e4654e386b03ec35c994aba6bb1d739ef Plot reel split points in the timeline. --- 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 + Copyright (C) 2013-2016 Carl Hetherington 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 +#include 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;