initialize members of text_symbolizer_properties and char_properties - refs #1114

This commit is contained in:
Dane Springmeyer 2012-03-05 13:48:35 -08:00
parent e9c043a42a
commit f3c4f9eec7
2 changed files with 6 additions and 1 deletions

View file

@ -56,7 +56,7 @@ struct char_properties
/** Construct object from XML. */
void from_xml(boost::property_tree::ptree const &sym, fontset_map const & fontsets);
/** Write object to XML ptree. */
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const &dfl=char_properties()) const;
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const& dfl=char_properties()) const;
std::string face_name;
font_set fontset;
float text_size;

View file

@ -31,6 +31,7 @@ namespace mapnik
using boost::optional;
text_symbolizer_properties::text_symbolizer_properties() :
displacement(0,0),
label_placement(POINT_PLACEMENT),
halign(H_AUTO),
jalign(J_MIDDLE),
@ -40,11 +41,13 @@ text_symbolizer_properties::text_symbolizer_properties() :
avoid_edges(false),
minimum_distance(0.0),
minimum_padding(0.0),
minimum_path_length(0.0),
max_char_angle_delta(22.5 * M_PI/180.0),
force_odd_labels(false),
allow_overlap(false),
text_ratio(0),
wrap_width(0),
format(),
tree_()
{
@ -218,6 +221,8 @@ void text_symbolizer_properties::set_old_style_expression(expression_ptr expr)
}
char_properties::char_properties() :
face_name(),
fontset(),
text_size(10.0),
character_spacing(0),
line_spacing(0),