collect expressions from format_properties
This commit is contained in:
parent
1927a00ee0
commit
9c39d4ebd2
2 changed files with 18 additions and 1 deletions
|
@ -68,6 +68,8 @@ struct MAPNIK_DECL format_properties
|
||||||
void from_xml(xml_node const& sym, fontset_map const& fontsets);
|
void from_xml(xml_node const& sym, fontset_map const& fontsets);
|
||||||
void to_xml(boost::property_tree::ptree & node, bool explicit_defaults,
|
void to_xml(boost::property_tree::ptree & node, bool explicit_defaults,
|
||||||
format_properties const& dfl = format_properties()) const;
|
format_properties const& dfl = format_properties()) const;
|
||||||
|
// collect expressions
|
||||||
|
void add_expressions(expression_set & output) const;
|
||||||
// expressions
|
// expressions
|
||||||
symbolizer_base::value_type text_size;
|
symbolizer_base::value_type text_size;
|
||||||
symbolizer_base::value_type character_spacing;
|
symbolizer_base::value_type character_spacing;
|
||||||
|
@ -79,6 +81,7 @@ struct MAPNIK_DECL format_properties
|
||||||
symbolizer_base::value_type fill;
|
symbolizer_base::value_type fill;
|
||||||
symbolizer_base::value_type halo_fill;
|
symbolizer_base::value_type halo_fill;
|
||||||
//
|
//
|
||||||
|
|
||||||
std::string face_name;
|
std::string face_name;
|
||||||
boost::optional<font_set> fontset;
|
boost::optional<font_set> fontset;
|
||||||
text_transform_e text_transform; //Per expression
|
text_transform_e text_transform; //Per expression
|
||||||
|
|
|
@ -206,7 +206,7 @@ void text_symbolizer_properties::to_xml(boost::property_tree::ptree &node,
|
||||||
void text_symbolizer_properties::add_expressions(expression_set & output) const
|
void text_symbolizer_properties::add_expressions(expression_set & output) const
|
||||||
{
|
{
|
||||||
layout_defaults.add_expressions(output);
|
layout_defaults.add_expressions(output);
|
||||||
//format_defaults.add_expressions(output); FIXME
|
format_defaults.add_expressions(output);
|
||||||
if (tree_) tree_->add_expressions(output);
|
if (tree_) tree_->add_expressions(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,4 +355,18 @@ void format_properties::to_xml(boost::property_tree::ptree & node, bool explicit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void format_properties::add_expressions(expression_set & output) const
|
||||||
|
{
|
||||||
|
if (is_expression(text_size)) output.insert(boost::get<expression_ptr>(text_size));
|
||||||
|
if (is_expression(character_spacing)) output.insert(boost::get<expression_ptr>(character_spacing));
|
||||||
|
if (is_expression(line_spacing)) output.insert(boost::get<expression_ptr>(line_spacing));
|
||||||
|
if (is_expression(halo_radius)) output.insert(boost::get<expression_ptr>(halo_radius));
|
||||||
|
if (is_expression(text_opacity)) output.insert(boost::get<expression_ptr>(text_opacity));
|
||||||
|
if (is_expression(halo_opacity)) output.insert(boost::get<expression_ptr>(halo_opacity));
|
||||||
|
if (is_expression(wrap_char)) output.insert(boost::get<expression_ptr>(wrap_char));
|
||||||
|
if (is_expression(fill)) output.insert(boost::get<expression_ptr>(fill));
|
||||||
|
if (is_expression(halo_fill)) output.insert(boost::get<expression_ptr>(halo_fill));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} //ns mapnik
|
} //ns mapnik
|
||||||
|
|
Loading…
Reference in a new issue