c++ style
This commit is contained in:
parent
9e84b6101b
commit
484c1fab50
1 changed files with 25 additions and 25 deletions
|
@ -134,18 +134,18 @@ enum text_upright
|
|||
|
||||
DEFINE_ENUM(text_upright_e, text_upright);
|
||||
|
||||
/** Properties for building the layout of a single text placement */
|
||||
// Properties for building the layout of a single text placement
|
||||
struct MAPNIK_DECL text_layout_properties
|
||||
{
|
||||
text_layout_properties();
|
||||
|
||||
/** Load all values from XML ptree. */
|
||||
// Load all values from XML ptree.
|
||||
void from_xml(xml_node const &sym);
|
||||
/** Save all values to XML ptree (but does not create a new parent node!). */
|
||||
// Save all values to XML ptree (but does not create a new parent node!).
|
||||
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, text_layout_properties const &dfl=text_layout_properties()) const;
|
||||
|
||||
/** Get a list of all expressions used in any placement.
|
||||
* This function is used to collect attributes. */
|
||||
// Get a list of all expressions used in any placement.
|
||||
// This function is used to collect attributes.
|
||||
void add_expressions(expression_set &output) const;
|
||||
|
||||
//Per layout options
|
||||
|
@ -164,55 +164,55 @@ using text_layout_properties_ptr = std::shared_ptr<text_layout_properties>;
|
|||
|
||||
class text_layout;
|
||||
|
||||
/** Contains all text symbolizer properties which are not directly related to text formatting and layout. */
|
||||
// Contains all text symbolizer properties which are not directly related to text formatting and layout.
|
||||
struct MAPNIK_DECL text_symbolizer_properties
|
||||
{
|
||||
text_symbolizer_properties();
|
||||
/** Load only placement related values from XML ptree. */
|
||||
// Load only placement related values from XML ptree.
|
||||
void placement_properties_from_xml(xml_node const &sym);
|
||||
/** Load all values from XML ptree. */
|
||||
// Load all values from XML ptree.
|
||||
void from_xml(xml_node const &sym, fontset_map const & fontsets);
|
||||
/** Save all values to XML ptree (but does not create a new parent node!). */
|
||||
// Save all values to XML ptree (but does not create a new parent node!).
|
||||
void to_xml(boost::property_tree::ptree &node, bool explicit_defaults, text_symbolizer_properties const &dfl=text_symbolizer_properties()) const;
|
||||
|
||||
/** Takes a feature and produces formated text as output.
|
||||
* The output object has to be created by the caller and passed in for thread safety.
|
||||
*/
|
||||
// Takes a feature and produces formated text as output.
|
||||
// The output object has to be created by the caller and passed in for thread safety.
|
||||
|
||||
void process(text_layout &output, feature_impl const& feature, attributes const& vars) const;
|
||||
/** Automatically create processing instructions for a single expression. */
|
||||
// Automatically create processing instructions for a single expression.
|
||||
void set_old_style_expression(expression_ptr expr);
|
||||
/** Sets new format tree. */
|
||||
// Sets new format tree.
|
||||
void set_format_tree(formatting::node_ptr tree);
|
||||
/** Get format tree. */
|
||||
// Get format tree.
|
||||
formatting::node_ptr format_tree() const;
|
||||
/** Get a list of all expressions used in any placement.
|
||||
* This function is used to collect attributes. */
|
||||
// Get a list of all expressions used in any placement.
|
||||
// This function is used to collect attributes.
|
||||
void add_expressions(expression_set &output) const;
|
||||
|
||||
//Per symbolizer options
|
||||
// Per symbolizer options
|
||||
label_placement_e label_placement;
|
||||
/** distance between repeated labels on a single geometry */
|
||||
// distance between repeated labels on a single geometry
|
||||
double label_spacing;
|
||||
/** distance the label can be moved on the line to fit, if 0 the default is used */
|
||||
// distance the label can be moved on the line to fit, if 0 the default is used
|
||||
double label_position_tolerance;
|
||||
bool avoid_edges;
|
||||
double minimum_distance;
|
||||
double minimum_padding;
|
||||
double minimum_path_length;
|
||||
double max_char_angle_delta;
|
||||
/** Always try render an odd amount of labels */
|
||||
// Always try render an odd amount of labels
|
||||
bool force_odd_labels;
|
||||
bool allow_overlap;
|
||||
/** Only consider geometry with largest bbox (polygons) */
|
||||
// Only consider geometry with largest bbox (polygons)
|
||||
bool largest_bbox_only;
|
||||
text_upright_e upright;
|
||||
|
||||
/** Default values for text layouts */
|
||||
// Default values for text layouts
|
||||
text_layout_properties layout_defaults;
|
||||
/** Default values for char_properties. */
|
||||
// Default values for char_properties.
|
||||
char_properties_ptr format;
|
||||
private:
|
||||
/** A tree of formatting::nodes which contain text and formatting information. */
|
||||
// A tree of formatting::nodes which contain text and formatting information.
|
||||
formatting::node_ptr tree_;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue