diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-07-28 15:44:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-07-28 15:44:48 +0100 |
| commit | 084eff7331b1a7c9923282c5860f490648ad633a (patch) | |
| tree | 70386b3508e47654aa4aeea1f3a9bcb2fcb6921f /src | |
| parent | d3cbf2fcc8762f8b3442f478db1a988544ab4ea1 (diff) | |
CENTRE_OF_SCREEN -> VERTICAL_CENTRE_OF_SCREEN.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp_reader.cc | 2 | ||||
| -rw-r--r-- | src/ssa_reader.cc | 6 | ||||
| -rw-r--r-- | src/stl_binary_writer.cc | 4 | ||||
| -rw-r--r-- | src/vertical_position.cc | 2 | ||||
| -rw-r--r-- | src/vertical_reference.cc | 2 | ||||
| -rw-r--r-- | src/vertical_reference.h | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/src/dcp_reader.cc b/src/dcp_reader.cc index 5144a41..bedd0e2 100644 --- a/src/dcp_reader.cc +++ b/src/dcp_reader.cc @@ -113,7 +113,7 @@ DCPReader::DCPReader (boost::filesystem::path file) rs.vertical_position.reference = TOP_OF_SCREEN; break; case dcp::VALIGN_CENTER: - rs.vertical_position.reference = CENTRE_OF_SCREEN; + rs.vertical_position.reference = VERTICAL_CENTRE_OF_SCREEN; break; case dcp::VALIGN_BOTTOM: rs.vertical_position.reference = BOTTOM_OF_SCREEN; diff --git a/src/ssa_reader.cc b/src/ssa_reader.cc index 147f1ba..81b6b9d 100644 --- a/src/ssa_reader.cc +++ b/src/ssa_reader.cc @@ -113,7 +113,7 @@ public: vertical_reference = TOP_OF_SCREEN; break; case 8: - vertical_reference = CENTRE_OF_SCREEN; + vertical_reference = VERTICAL_CENTRE_OF_SCREEN; break; case 0: vertical_reference = BOTTOM_OF_SCREEN; @@ -213,7 +213,7 @@ SSAReader::parse_line (RawSubtitle base, string line) case TOP_OF_SUBTITLE: /* Nothing to do */ break; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: current.vertical_position.proportional = current.vertical_position.proportional.get() - ((line_breaks + 1) * line_size) / 2; break; case BOTTOM_OF_SCREEN: @@ -254,7 +254,7 @@ SSAReader::parse_line (RawSubtitle base, string line) } else if (style == "\\an1" || style == "\\an2" || style == "\\an3") { current.vertical_position.reference = sub::BOTTOM_OF_SCREEN; } else if (style == "\\an4" || style == "\\an5" || style == "\\an6") { - current.vertical_position.reference = sub::CENTRE_OF_SCREEN; + current.vertical_position.reference = sub::VERTICAL_CENTRE_OF_SCREEN; } else if (style == "\\an7" || style == "\\an8" || style == "\\an9") { current.vertical_position.reference = sub::TOP_OF_SCREEN; } diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index 60adda4..e4e06fb 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -99,7 +99,7 @@ vertical_position (sub::Line const & line) case TOP_OF_SCREEN: vp = rint (line.vertical_position.proportional.get() * ROWS); break; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: vp = rint (line.vertical_position.proportional.get() * ROWS + (ROWS / 2.0)); break; case BOTTOM_OF_SCREEN: @@ -114,7 +114,7 @@ vertical_position (sub::Line const & line) case TOP_OF_SCREEN: vp = prop * ROWS; break; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: vp = (prop + 0.5) * ROWS; break; case BOTTOM_OF_SCREEN: diff --git a/src/vertical_position.cc b/src/vertical_position.cc index 817c366..aca327f 100644 --- a/src/vertical_position.cc +++ b/src/vertical_position.cc @@ -34,7 +34,7 @@ VerticalPosition::fraction_from_screen_top () const switch (reference.get ()) { case TOP_OF_SCREEN: return prop; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: return prop + 0.5; case BOTTOM_OF_SCREEN: return 1 - prop; diff --git a/src/vertical_reference.cc b/src/vertical_reference.cc index 7dff965..d7833a1 100644 --- a/src/vertical_reference.cc +++ b/src/vertical_reference.cc @@ -30,7 +30,7 @@ sub::string_to_vertical_reference (string s) if (s == "top") { return TOP_OF_SCREEN; } else if (s == "center") { - return CENTRE_OF_SCREEN; + return VERTICAL_CENTRE_OF_SCREEN; } else if (s == "bottom") { return BOTTOM_OF_SCREEN; } diff --git a/src/vertical_reference.h b/src/vertical_reference.h index 9156550..ca079cb 100644 --- a/src/vertical_reference.h +++ b/src/vertical_reference.h @@ -29,7 +29,7 @@ enum VerticalReference /** distance is from the top of the screen, positive moves down */ TOP_OF_SCREEN, /** distance is from the centre of the screen, positive moves down */ - CENTRE_OF_SCREEN, + VERTICAL_CENTRE_OF_SCREEN, /** distance is from the bottom of the screen, positive moves up */ BOTTOM_OF_SCREEN, /** position on screen is not known, so we are referring |
