diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-03 23:32:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-03 23:32:48 +0100 |
| commit | e1f53890da6e4be2555a9e17a52edcc03d53656b (patch) | |
| tree | ff148f4d8dc54b1a09fa21ca743fce261f01c021 /src/interop_subtitle_content.cc | |
| parent | 47b52fb54f302d5faf93a19ae2fe28fa610f96ca (diff) | |
Basic HAlign / HPosition support.
Diffstat (limited to 'src/interop_subtitle_content.cc')
| -rw-r--r-- | src/interop_subtitle_content.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interop_subtitle_content.cc b/src/interop_subtitle_content.cc index 4829f077..a833e795 100644 --- a/src/interop_subtitle_content.cc +++ b/src/interop_subtitle_content.cc @@ -171,6 +171,12 @@ InteropSubtitleContent::xml_as_string () const } xmlpp::Element* text = subtitle_element->add_child ("Text"); + if (i->h_align() != HALIGN_CENTER) { + text->set_attribute ("HAlign", halign_to_string (i->h_align ())); + } + if (i->h_position() > ALIGN_EPSILON) { + text->set_attribute ("HPosition", raw_convert<string> (i->h_position() * 100, 6)); + } text->set_attribute ("VAlign", valign_to_string (i->v_align())); text->set_attribute ("VPosition", raw_convert<string> (i->v_position() * 100, 6)); text->add_child_text (i->text()); |
