summaryrefslogtreecommitdiff
path: root/src/subtitle.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-20 23:17:40 +0200
committerCarl Hetherington <cth@carlh.net>2022-11-03 09:31:53 +0100
commit5048e3e1d91858c2a4132e616438e1943f820124 (patch)
tree5ef98efb29690e8320d4e9e36266f41e1214e174 /src/subtitle.cc
parent80fc63959caa039401a4d7e33bc72cd3c6ec2fe3 (diff)
Add Z position to subtitles; existing tests pass.
Diffstat (limited to 'src/subtitle.cc')
-rw-r--r--src/subtitle.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/subtitle.cc b/src/subtitle.cc
index 15481528..522b0e5f 100644
--- a/src/subtitle.cc
+++ b/src/subtitle.cc
@@ -53,6 +53,7 @@ Subtitle::Subtitle (
HAlign h_align,
float v_position,
VAlign v_align,
+ float z_position,
Time fade_up_time,
Time fade_down_time
)
@@ -62,6 +63,7 @@ Subtitle::Subtitle (
, _h_align (h_align)
, _v_position (v_position)
, _v_align (v_align)
+ , _z_position(z_position)
, _fade_up_time (fade_up_time)
, _fade_down_time (fade_down_time)
{
@@ -104,6 +106,11 @@ Subtitle::equals(shared_ptr<const Subtitle> other, EqualityOptions, NoteHandler
same = false;
}
+ if (z_position() != other->z_position()) {
+ note(NoteType::ERROR, "subtitle Z positions differ");
+ same = false;
+ }
+
if (fade_up_time() != other->fade_up_time()) {
note(NoteType::ERROR, "subtitle fade-up times differ");
same = false;