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/stl_binary_reader.cc | |
| parent | 6a90762b8d103d256aa3851e55574154881a4612 (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.cc | 15 |
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) { |
