diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-21 22:23:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-21 22:23:13 +0100 |
| commit | df6ed597b720399f02e7b75a7cf448d0956c89a1 (patch) | |
| tree | 53fcd9862ea0e9eb5abd5b4d883d1a5c03735158 /src/subtitle_asset.cc | |
| parent | b627827aaa5a314b53fe0f8b0429dee8b542ccb3 (diff) | |
Vertical align.
Diffstat (limited to 'src/subtitle_asset.cc')
| -rw-r--r-- | src/subtitle_asset.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index 827fbf7d..9a3e3bbc 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -65,6 +65,7 @@ SubtitleAsset::examine_font_node (shared_ptr<FontNode> font_node, list<shared_pt (*j)->in, (*j)->out, (*k)->v_position, + (*k)->v_align, (*k)->text, effective.effect.get(), effective.effect_color.get() @@ -149,9 +150,18 @@ SubtitleNode::SubtitleNode (xmlpp::Node const * node) TextNode::TextNode (xmlpp::Node const * node) : XMLNode (node) + , v_align (CENTER) { text = content (); v_position = float_attribute ("VPosition"); + string const v = optional_string_attribute ("VAlign"); + if (v == "top") { + v_align = TOP; + } else if (v == "center") { + v_align = CENTER; + } else if (v == "bottom") { + v_align = BOTTOM; + } } list<shared_ptr<Subtitle> > @@ -194,6 +204,7 @@ Subtitle::Subtitle ( Time in, Time out, float v_position, + VAlign v_align, string text, Effect effect, Color effect_color @@ -205,6 +216,7 @@ Subtitle::Subtitle ( , _in (in) , _out (out) , _v_position (v_position) + , _v_align (v_align) , _text (text) , _effect (effect) , _effect_color (effect_color) |
