diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-20 23:17:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-11-03 09:31:53 +0100 |
| commit | 5048e3e1d91858c2a4132e616438e1943f820124 (patch) | |
| tree | 5ef98efb29690e8320d4e9e36266f41e1214e174 /src/subtitle_string.cc | |
| parent | 80fc63959caa039401a4d7e33bc72cd3c6ec2fe3 (diff) | |
Add Z position to subtitles; existing tests pass.
Diffstat (limited to 'src/subtitle_string.cc')
| -rw-r--r-- | src/subtitle_string.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/subtitle_string.cc b/src/subtitle_string.cc index 7f7c74a5..91a129da 100644 --- a/src/subtitle_string.cc +++ b/src/subtitle_string.cc @@ -67,6 +67,7 @@ SubtitleString::SubtitleString ( HAlign h_align, float v_position, VAlign v_align, + float z_position, Direction direction, string text, Effect effect, @@ -75,7 +76,7 @@ SubtitleString::SubtitleString ( Time fade_down_time, float space_before ) - : Subtitle (in, out, h_position, h_align, v_position, v_align, fade_up_time, fade_down_time) + : Subtitle(in, out, h_position, h_align, v_position, v_align, z_position, fade_up_time, fade_down_time) , _font (font) , _italic (italic) , _bold (bold) @@ -122,6 +123,7 @@ dcp::operator== (SubtitleString const & a, SubtitleString const & b) a.h_align() == b.h_align() && a.v_position() == b.v_position() && a.v_align() == b.v_align() && + a.z_position() == b.z_position() && a.direction() == b.direction() && a.text() == b.text() && a.effect() == b.effect() && @@ -167,6 +169,7 @@ dcp::operator<< (ostream& s, SubtitleString const & sub) << ", colour (" << sub.colour().r << ", " << sub.colour().g << ", " << sub.colour().b << ")" << ", vpos " << sub.v_position() << ", valign " << ((int) sub.v_align()) << ", hpos " << sub.h_position() << ", halign " << ((int) sub.h_align()) + << ", zpos " << sub.z_position() << ", direction " << ((int) sub.direction()) << ", effect " << ((int) sub.effect()) << ", effect colour (" << sub.effect_colour().r << ", " << sub.effect_colour().g << ", " << sub.effect_colour().b << ")" |
