diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-01-11 10:24:22 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-01-11 10:24:22 +0000 |
| commit | 3d236df4bbe1e7e8a8c8c4c467c9b9178ace00f1 (patch) | |
| tree | fe158d7e4323010c3659d94e3f56363e07999be2 /src/stl_binary_reader.cc | |
| parent | becc88e69211c07b1fdcd6572084d43728116ee2 (diff) | |
Forward-port STL binary writer from master, pulling in horizontal position stuff.
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 8d7befb..0c24a14 100644 --- a/src/stl_binary_reader.cc +++ b/src/stl_binary_reader.cc @@ -110,6 +110,21 @@ STLBinaryReader::STLBinaryReader (istream& in) sub.italic = italic; sub.underline = underline; + /* 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; + } + /* Loop over characters */ string text; for (size_t j = 0; j < lines[i].size(); ++j) { |
