Easier syntax by hiding internal data type.
This commit is contained in:
parent
1e2897b28d
commit
9c92bf713d
2 changed files with 5 additions and 4 deletions
|
@ -117,6 +117,7 @@ struct text_symbolizer_properties
|
|||
/** Default values for char_properties. */
|
||||
char_properties default_format;
|
||||
private:
|
||||
/** A tree of formating::nodes which contain text and formating information. */
|
||||
formating::node_ptr tree_;
|
||||
};
|
||||
|
||||
|
@ -133,7 +134,7 @@ public:
|
|||
};
|
||||
public:
|
||||
processed_text(face_manager<freetype_engine> & font_manager, double scale_factor);
|
||||
void push_back(processed_expression const& exp);
|
||||
void push_back(char_properties const& properties, UnicodeString const& text);
|
||||
unsigned size() const { return expr_list_.size(); }
|
||||
unsigned empty() const { return expr_list_.empty(); }
|
||||
void clear();
|
||||
|
|
|
@ -170,7 +170,7 @@ void text_node::apply(char_properties const& p, Feature const& feature, processe
|
|||
text_str = text_str.toTitle(NULL);
|
||||
}
|
||||
if (text_str.length() > 0) {
|
||||
output.push_back(processed_text::processed_expression(p, text_str));
|
||||
output.push_back(p, text_str);
|
||||
} else {
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::cerr << "Warning: Empty expression.\n";
|
||||
|
@ -346,9 +346,9 @@ void format_node::set_halo_radius(optional<double> radius)
|
|||
|
||||
/************************************************************/
|
||||
|
||||
void processed_text::push_back(processed_expression const& exp)
|
||||
void processed_text::push_back(char_properties const& properties, UnicodeString const& text)
|
||||
{
|
||||
expr_list_.push_back(exp);
|
||||
expr_list_.push_back(processed_expression(properties, text));
|
||||
}
|
||||
|
||||
processed_text::expression_list::const_iterator processed_text::begin() const
|
||||
|
|
Loading…
Add table
Reference in a new issue