diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-13 22:18:59 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-13 22:18:59 +0200 |
| commit | 8bc480da2db924349465dbe557f87bd6f05b7fdd (patch) | |
| tree | 9fcbab45685746b7a00b1045aca19f495f4f92df /src/subtitle_string.h | |
| parent | 0ecf58d20eec5e9d10ee4b9f0440d232d875f94a (diff) | |
Basic implementation of <Space> tag in subtitles.v1.8.3
Diffstat (limited to 'src/subtitle_string.h')
| -rw-r--r-- | src/subtitle_string.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/subtitle_string.h b/src/subtitle_string.h index bf9c87d9..f6d0974b 100644 --- a/src/subtitle_string.h +++ b/src/subtitle_string.h @@ -76,6 +76,7 @@ public: * @param effect_colour Colour of the effect * @param fade_up_time Time to fade the text in * @param fade_down_time Time to fade the text out + * @param space_before Space to add before this string, in ems (could be negative to remove space). */ SubtitleString ( boost::optional<std::string> font, @@ -96,7 +97,8 @@ public: Effect effect, Colour effect_colour, Time fade_up_time, - Time fade_down_time + Time fade_down_time, + float space_before ); /** @return font ID */ @@ -142,6 +144,10 @@ public: int size_in_pixels (int screen_height) const; + float space_before () const { + return _space_before; + } + /** @return Aspect ratio `adjustment' of the font size. * Values greater than 1 widen each character, values less than 1 narrow each character, * and the value must be between 0.25 and 4. @@ -202,6 +208,7 @@ private: std::string _text; Effect _effect; Colour _effect_colour; + float _space_before; }; bool operator== (SubtitleString const & a, SubtitleString const & b); |
