summaryrefslogtreecommitdiff
path: root/src/stl_binary_reader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-16 10:35:00 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-16 10:35:00 +0000
commitf9c43d87b62653c2d37d4a7b470ca7d4c30b6af0 (patch)
tree1cba96c7bd5a80fec7969aae16af3da4adadd54b /src/stl_binary_reader.cc
parent6a90762b8d103d256aa3851e55574154881a4612 (diff)
Support horizontal positioning in STL binary reader/writer and DCP reader.
Diffstat (limited to 'src/stl_binary_reader.cc')
-rw-r--r--src/stl_binary_reader.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stl_binary_reader.cc b/src/stl_binary_reader.cc
index 2246a01..9a2fc11 100644
--- a/src/stl_binary_reader.cc
+++ b/src/stl_binary_reader.cc
@@ -101,6 +101,21 @@ STLBinaryReader::STLBinaryReader (istream& in)
sub.vertical_position.lines = maximum_rows;
sub.vertical_position.reference = TOP_OF_SCREEN;
+ /* XXX: not sure what to do with JC = 0, "unchanged presentation" */
+ int const h = get_int (14, 1);
+ switch (h) {
+ case 0:
+ case 2:
+ sub.horizontal_position = CENTRE;
+ break;
+ case 1:
+ sub.horizontal_position = LEFT;
+ break;
+ case 3:
+ sub.horizontal_position = RIGHT;
+ break;
+ }
+
string text;
for (size_t j = 0; j < lines[i].size(); ++j) {