From 7fd9fb0c88e8ddb91b94845fdf6322cb091cbfa0 Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Sun, 22 Jan 2012 03:32:21 +0100 Subject: [PATCH] Small fixes. --- include/mapnik/text_placements.hpp | 9 +++------ src/text_placements.cpp | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/mapnik/text_placements.hpp b/include/mapnik/text_placements.hpp index 14c55367d..0c462046a 100644 --- a/include/mapnik/text_placements.hpp +++ b/include/mapnik/text_placements.hpp @@ -123,13 +123,11 @@ class text_placement_info : boost::noncopyable public: text_placement_info(text_placements const* parent); /** Get next placement. - * This function is also called before the first placement is tried. */ - virtual bool next()=0; - /** Get next placement position. - * This function is also called before the first position is used. + * This function is also called before the first placement is tried. * Each class has to return at least one position! * If this functions returns false the placement data should be considered invalid! */ + virtual bool next()=0; virtual bool next_position_only() { return false; } virtual ~text_placement_info() {} void init(double scale_factor_, @@ -164,8 +162,7 @@ typedef boost::shared_ptr text_placement_info_ptr; class text_placements { public: - text_placements() : - text_size_(10), halign_(H_MIDDLE), jalign_(J_MIDDLE), valign_(V_MIDDLE) {} + text_placements(); virtual text_placement_info_ptr get_placement_info() const =0; virtual void set_default_text_size(float size) { text_size_ = size; } diff --git a/src/text_placements.cpp b/src/text_placements.cpp index f6d81224b..5eeb769c4 100644 --- a/src/text_placements.cpp +++ b/src/text_placements.cpp @@ -312,11 +312,9 @@ void char_properties::to_xml(boost::property_tree::ptree &node, bool explicit_de /************************************************************************/ -#if 0 text_placements::text_placements() : properties() { } -#endif std::set text_placements::get_all_expressions() { @@ -444,7 +442,7 @@ text_placement_info_ptr text_placements_simple::get_placement_info() const return text_placement_info_ptr(new text_placement_info_simple(this)); } -/** Positiion string: [POS][SIZE] +/** Position string: [POS][SIZE] * [POS] is any combination of * N, E, S, W, NE, SE, NW, SW, X (exact position) (separated by commas) * [SIZE] is a list of font sizes, separated by commas. The first font size