From cef7a679a59044a5c807768042deecfd56ec6fc2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 23 Apr 2020 00:11:38 +0200 Subject: Add subtitle analysis so that the outline of all subtitles in a piece of content can be overlaid onto the preview (#1233). --- src/wx/simple_video_view.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/wx/simple_video_view.cc') 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 > 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(); } -- cgit v1.2.3