summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-11-30 23:45:13 +0000
committerCarl Hetherington <cth@carlh.net>2014-11-30 23:45:13 +0000
commitf3f1c965337fc6e4a269f4567676b389c869b03d (patch)
tree537aab89c8d0c00a823a4bb62789098ddfdacee3 /tools
parent57efa484eb4fc4bfa2c02cac5b4d941e1fafb2e9 (diff)
Make dumpsubs dump vertical position.
Diffstat (limited to 'tools')
-rw-r--r--tools/dumpsubs.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/dumpsubs.cc b/tools/dumpsubs.cc
index 98760ea..d8fb0c2 100644
--- a/tools/dumpsubs.cc
+++ b/tools/dumpsubs.cc
@@ -87,6 +87,32 @@ main (int argc, char* argv[])
for (list<sub::Subtitle>::const_iterator i = subs.begin(); i != subs.end(); ++i) {
cout << "Subtitle " << n << " at " << i->from << " -> " << i->to << "\n";
for (list<sub::Line>::const_iterator j = i->lines.begin(); j != i->lines.end(); ++j) {
+
+ cout << "\t";
+
+ if (j->vertical_position.proportional) {
+ cout << j->vertical_position.proportional.get() << " of screen";
+ } else if (j->vertical_position.line) {
+ cout << j->vertical_position.line.get() << " lines";
+ }
+ if (j->vertical_position.reference) {
+ cout << " from ";
+ switch (j->vertical_position.reference.get()) {
+ case TOP_OF_SCREEN:
+ cout << "top";
+ break;
+ case CENTRE_OF_SCREEN:
+ cout << "centre";
+ break;
+ case BOTTOM_OF_SCREEN:
+ cout << "bottom";
+ break;
+ case TOP_OF_SUBTITLE:
+ cout << "top of subtitle";
+ break;
+ }
+ }
+
cout << "\t";
bool italic = false;
bool underline = false;