diff --git a/docs/textrendering.gv b/docs/textrendering.gv index 285ec4cb2..90a897a6a 100644 --- a/docs/textrendering.gv +++ b/docs/textrendering.gv @@ -13,8 +13,12 @@ digraph textrendering { text_placements -> text_placement_info [label="get_placement_info()", style=dashed] text_placement_info -> text_symbolizer_properties [label="properties"] text_placement_info -> text_path [label="placements", style=dashed] + text_placement_info -> text_placement_info [label="next()"] text_symbolizer_properties -> text_processor [label="processor"] - text_path -> Renderer [label="used by"] + text_processor -> processed_text [label="process()", style=dashed] + processed_text -> string_info [label="get_string_info()"] + text_path -> Renderer [color=red, label="used by"] Renderer -> text_placement_info [color=red, label="init()"] + Renderer -> processed_text [color=red, label="initializes"] -} \ No newline at end of file +} diff --git a/include/mapnik/text_processing.hpp b/include/mapnik/text_processing.hpp index 512282b00..450acb0bb 100644 --- a/include/mapnik/text_processing.hpp +++ b/include/mapnik/text_processing.hpp @@ -52,7 +52,9 @@ DEFINE_ENUM( text_transform_e, text_transform ); struct char_properties { char_properties(); + /** Construct object from XML. */ void set_values_from_xml(boost::property_tree::ptree const &sym, std::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; std::string face_name; font_set fontset; @@ -75,7 +77,6 @@ public: p(properties), str(text) {} char_properties p; UnicodeString str; - }; class processed_text @@ -113,10 +114,13 @@ public: * The output object has to be created by the caller and passed in for thread safety. */ void process(processed_text &output, Feature const& feature); + /** Automatically create processing instructions for a single expression. */ void set_old_style_expression(expression_ptr expr); /** Add a new formating token. */ void push_back(abstract_token *token); + /** Get a list of all expressions used in any placement. This function is used to collect attributes. */ std::set get_all_expressions() const; + /** Default values for char_properties. */ char_properties defaults; protected: void from_xml_recursive(boost::property_tree::ptree const& pt, std::map const &fontsets);