From 3d236df4bbe1e7e8a8c8c4c467c9b9178ace00f1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 11 Jan 2017 10:24:22 +0000 Subject: Forward-port STL binary writer from master, pulling in horizontal position stuff. --- src/stl_binary_reader.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/stl_binary_reader.cc') 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) { -- cgit v1.2.3