X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fstl_binary_writer.cc;h=d4fe9ed69c9185ee2101ff584d5c846c1ce88bde;hb=965301324c77d2c168cbda55ff6b70a08fe4e4a6;hp=60adda4bf2df1d1082aa3b0859bb42c6dc7291cd;hpb=a25cc3fda26e2bbc6b1c3786cc7f2ed7141a29f0;p=libsub.git diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index 60adda4..d4fe9ed 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -99,7 +99,7 @@ vertical_position (sub::Line const & line) case TOP_OF_SCREEN: vp = rint (line.vertical_position.proportional.get() * ROWS); break; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: vp = rint (line.vertical_position.proportional.get() * ROWS + (ROWS / 2.0)); break; case BOTTOM_OF_SCREEN: @@ -114,7 +114,7 @@ vertical_position (sub::Line const & line) case TOP_OF_SCREEN: vp = prop * ROWS; break; - case CENTRE_OF_SCREEN: + case VERTICAL_CENTRE_OF_SCREEN: vp = (prop + 0.5) * ROWS; break; case BOTTOM_OF_SCREEN: @@ -268,14 +268,14 @@ sub::write_stl_binary ( /* Justification code */ /* XXX: this assumes the first line has the right value */ - switch (i->lines.front().horizontal_position) { - case LEFT: + switch (i->lines.front().horizontal_position.reference) { + case LEFT_OF_SCREEN: put_int_as_int (buffer + 14, tables.justification_enum_to_file (JUSTIFICATION_LEFT), 1); break; - case CENTRE: + case HORIZONTAL_CENTRE_OF_SCREEN: put_int_as_int (buffer + 14, tables.justification_enum_to_file (JUSTIFICATION_CENTRE), 1); break; - case RIGHT: + case RIGHT_OF_SCREEN: put_int_as_int (buffer + 14, tables.justification_enum_to_file (JUSTIFICATION_RIGHT), 1); break; }