diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-08 01:30:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-07-08 01:48:50 +0100 |
| commit | ac2fa2172c30c234a19628d7a9ae696e435a56db (patch) | |
| tree | c9cfc40955708732ee1f7ad5e0d23feb099cc607 /src/lib/subtitle_decoder.cc | |
| parent | 61f81caacd7d45ace5c1a52c1f7b4f8afac5eb80 (diff) | |
Support shadow in subtitles (#911).
Diffstat (limited to 'src/lib/subtitle_decoder.cc')
| -rw-r--r-- | src/lib/subtitle_decoder.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/subtitle_decoder.cc b/src/lib/subtitle_decoder.cc index 09f7a6700..b31b4873f 100644 --- a/src/lib/subtitle_decoder.cc +++ b/src/lib/subtitle_decoder.cc @@ -218,6 +218,13 @@ SubtitleDecoder::give_text (ContentTimePeriod period, sub::Subtitle const & subt } } + dcp::Effect effect = dcp::NONE; + if (content()->outline()) { + effect = dcp::BORDER; + } else if (content()->shadow()) { + effect = dcp::SHADOW; + } + out.push_back ( dcp::SubtitleString ( string(TEXT_FONT_ID), @@ -236,8 +243,8 @@ SubtitleDecoder::give_text (ContentTimePeriod period, sub::Subtitle const & subt v_align, dcp::DIRECTION_LTR, j.text, - content()->outline() ? dcp::BORDER : dcp::NONE, - content()->outline_colour(), + effect, + content()->effect_colour(), dcp::Time (0, 1000), dcp::Time (0, 1000) ) |
