diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-16 10:35:00 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-16 10:35:00 +0000 |
| commit | f9c43d87b62653c2d37d4a7b470ca7d4c30b6af0 (patch) | |
| tree | 1cba96c7bd5a80fec7969aae16af3da4adadd54b /src/dcp_reader.cc | |
| parent | 6a90762b8d103d256aa3851e55574154881a4612 (diff) | |
Support horizontal positioning in STL binary reader/writer and DCP reader.
Diffstat (limited to 'src/dcp_reader.cc')
| -rw-r--r-- | src/dcp_reader.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/dcp_reader.cc b/src/dcp_reader.cc index 3376e36..b3b9bda 100644 --- a/src/dcp_reader.cc +++ b/src/dcp_reader.cc @@ -53,16 +53,28 @@ DCPReader::DCPReader (boost::filesystem::path file) sub.vertical_position.proportional = float ((*i)->v_position ()) / 100; switch ((*i)->v_align ()) { - case libdcp::TOP: + case libdcp::VERTICAL_TOP: sub.vertical_position.reference = TOP_OF_SCREEN; break; - case libdcp::CENTER: + case libdcp::VERTICAL_CENTER: sub.vertical_position.reference = CENTRE_OF_SCREEN; break; - case libdcp::BOTTOM: + case libdcp::VERTICAL_BOTTOM: sub.vertical_position.reference = BOTTOM_OF_SCREEN; break; } + + switch ((*i)->h_align ()) { + case libdcp::HORIZONTAL_LEFT: + sub.horizontal_position = LEFT; + break; + case libdcp::HORIZONTAL_CENTER: + sub.horizontal_position = CENTRE; + break; + case libdcp::HORIZONTAL_RIGHT: + sub.horizontal_position = RIGHT; + break; + } sub.from.set_metric (dcp_to_metric ((*i)->in ())); sub.to.set_metric (dcp_to_metric ((*i)->out ())); |
