diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-21 18:32:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-21 18:32:11 +0100 |
| commit | e8bb753ea7f1dfe2dac761050f47ea1cb786f01b (patch) | |
| tree | 514f2e1043e34b5e2233642d075b31fd6d1812f4 /src/subtitle_asset.cc | |
| parent | 3fc1eba823a52603aa58f3df6f08dc4e73309c63 (diff) | |
Pick up subtitle color.
Diffstat (limited to 'src/subtitle_asset.cc')
| -rw-r--r-- | src/subtitle_asset.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index c27fd2c0..a5c94b80 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -60,6 +60,7 @@ SubtitleAsset::examine_font_node (shared_ptr<FontNode> font_node, list<shared_pt new Subtitle ( font_id_to_name (effective.id), effective.italic.get(), + effective.color.get(), effective.size, (*j)->in, (*j)->out, @@ -84,6 +85,7 @@ FontNode::FontNode (xmlpp::Node const * node) id = string_attribute ("Id"); size = optional_int64_attribute ("Size"); italic = optional_bool_attribute ("Italic"); + color = optional_color_attribute ("Color"); subtitle_nodes = sub_nodes<SubtitleNode> ("Subtitle"); font_nodes = sub_nodes<FontNode> ("Font"); } @@ -91,6 +93,7 @@ FontNode::FontNode (xmlpp::Node const * node) FontNode::FontNode (list<shared_ptr<FontNode> > const & font_nodes) : size (0) , italic (false) + , color ("FFFFFFFF") { for (list<shared_ptr<FontNode> >::const_iterator i = font_nodes.begin(); i != font_nodes.end(); ++i) { if (!(*i)->id.empty ()) { @@ -102,6 +105,9 @@ FontNode::FontNode (list<shared_ptr<FontNode> > const & font_nodes) if ((*i)->italic) { italic = (*i)->italic.get (); } + if ((*i)->color) { + color = (*i)->color.get (); + } } } @@ -163,6 +169,7 @@ SubtitleAsset::font_id_to_name (string id) const Subtitle::Subtitle ( std::string font, bool italic, + Color color, int size, Time in, Time out, @@ -171,6 +178,7 @@ Subtitle::Subtitle ( ) : _font (font) , _italic (italic) + , _color (color) , _size (size) , _in (in) , _out (out) |
