+ add orientation parameter
orientation="<expr>" e.g orientation="10+35" -> rotate by 45 degrees anti-clockwise (TODO: consider using standard SVG transform!)
This commit is contained in:
parent
8767c404c3
commit
77c31e8643
2 changed files with 17 additions and 0 deletions
|
@ -99,6 +99,10 @@ namespace mapnik
|
|||
text_symbolizer& operator=(text_symbolizer const& rhs);
|
||||
expression_ptr get_name() const;
|
||||
void set_name(expression_ptr expr);
|
||||
|
||||
expression_ptr get_orientation() const; // orienation (rotation angle atm)
|
||||
void set_orientation(expression_ptr expr);
|
||||
|
||||
unsigned get_text_ratio() const; // target ratio for text bounding box in pixels
|
||||
void set_text_ratio(unsigned ratio);
|
||||
unsigned get_wrap_width() const; // width to wrap text at, or trigger ratio
|
||||
|
@ -158,6 +162,7 @@ namespace mapnik
|
|||
|
||||
private:
|
||||
expression_ptr name_;
|
||||
expression_ptr orientation_;
|
||||
std::string face_name_;
|
||||
font_set fontset_;
|
||||
unsigned size_;
|
||||
|
|
|
@ -142,6 +142,7 @@ text_symbolizer::text_symbolizer(expression_ptr name, unsigned size, color const
|
|||
|
||||
text_symbolizer::text_symbolizer(text_symbolizer const& rhs)
|
||||
: name_(rhs.name_),
|
||||
orientation_(rhs.orientation_),
|
||||
face_name_(rhs.face_name_),
|
||||
fontset_(rhs.fontset_),
|
||||
size_(rhs.size_),
|
||||
|
@ -175,6 +176,7 @@ text_symbolizer& text_symbolizer::operator=(text_symbolizer const& other)
|
|||
if (this == &other)
|
||||
return *this;
|
||||
name_ = other.name_;
|
||||
orientation_ = other.orientation_;
|
||||
face_name_ = other.face_name_;
|
||||
fontset_ = other.fontset_;
|
||||
size_ = other.size_;
|
||||
|
@ -215,6 +217,16 @@ void text_symbolizer::set_name(expression_ptr name)
|
|||
name_ = name;
|
||||
}
|
||||
|
||||
expression_ptr text_symbolizer::get_orientation() const
|
||||
{
|
||||
return orientation_;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_orientation(expression_ptr orientation)
|
||||
{
|
||||
orientation_ = orientation;
|
||||
}
|
||||
|
||||
std::string const& text_symbolizer::get_face_name() const
|
||||
{
|
||||
return face_name_;
|
||||
|
|
Loading…
Add table
Reference in a new issue