diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-23 00:11:38 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-24 00:46:31 +0200 |
| commit | cef7a679a59044a5c807768042deecfd56ec6fc2 (patch) | |
| tree | b0e020a2a70db228df0e96fd85b63a84d7d69b64 /src/wx/simple_video_view.cc | |
| parent | 87d5a977da0696fbe73b96b2679b7cbb471e7255 (diff) | |
Add subtitle analysis so that the outline of all subtitles
in a piece of content can be overlaid onto the preview (#1233).
Diffstat (limited to 'src/wx/simple_video_view.cc')
| -rw-r--r-- | src/wx/simple_video_view.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc index e2ef866c4..768c32087 100644 --- a/src/wx/simple_video_view.cc +++ b/src/wx/simple_video_view.cc @@ -130,6 +130,15 @@ SimpleVideoView::paint () dc.SetBrush (*wxTRANSPARENT_BRUSH); dc.DrawRectangle (_inter_position.x, _inter_position.y + (panel_size.GetHeight() - out_size.height) / 2, _inter_size.width, _inter_size.height); } + + optional<dcpomatic::Rect<double> > subs = _viewer->outline_subtitles(); + if (subs) { + wxPen p (wxColour(0, 255, 0), 2); + dc.SetPen (p); + dc.SetBrush (*wxTRANSPARENT_BRUSH); + dc.DrawRectangle (subs->x * out_size.width, subs->y * out_size.height, subs->width * out_size.width, subs->height * out_size.height); + } + _state_timer.unset(); } |
