remove unused text_symbolizer.hpp/cpp
This commit is contained in:
parent
ecc5acbdb9
commit
19c2b76e10
4 changed files with 0 additions and 647 deletions
|
@ -35,7 +35,6 @@
|
|||
#include <mapnik/text/formatting/expression_format.hpp>
|
||||
#include <mapnik/text/formatting/layout.hpp>
|
||||
#include <mapnik/text/layout.hpp>
|
||||
#include <mapnik/text_symbolizer.hpp>
|
||||
#include <mapnik/symbolizer.hpp>
|
||||
|
||||
#include "mapnik_enumeration.hpp"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/box2d.hpp>
|
||||
#include <mapnik/font_set.hpp>
|
||||
#include <mapnik/text_symbolizer.hpp>
|
||||
#include <mapnik/noncopyable.hpp>
|
||||
#include <mapnik/value_types.hpp>
|
||||
#include <mapnik/pixel_position.hpp>
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* This file is part of Mapnik (c++ mapping toolkit)
|
||||
*
|
||||
* Copyright (C) 2011 Artem Pavlenko
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAPNIK_TEXT_SYMBOLIZER_HPP
|
||||
#define MAPNIK_TEXT_SYMBOLIZER_HPP
|
||||
|
||||
// mapnik
|
||||
/*
|
||||
#include <mapnik/color.hpp>
|
||||
#include <mapnik/font_set.hpp>
|
||||
#include <mapnik/symbolizer.hpp>
|
||||
#include <mapnik/text/placements/base.hpp>
|
||||
#include <mapnik/text/placements/dummy.hpp>
|
||||
|
||||
// boost
|
||||
#include <memory>
|
||||
|
||||
|
||||
|
||||
// stl
|
||||
#include <string>
|
||||
|
||||
#if (!defined(NO_DEPRECATION_WARNINGS) && __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
#define func_deprecated __attribute__ ((deprecated))
|
||||
#else
|
||||
#define func_deprecated
|
||||
#endif
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
enum halo_rasterizer_enum
|
||||
{
|
||||
HALO_RASTERIZER_FULL,
|
||||
HALO_RASTERIZER_FAST,
|
||||
halo_rasterizer_enum_MAX
|
||||
};
|
||||
|
||||
DEFINE_ENUM(halo_rasterizer_e, halo_rasterizer_enum);
|
||||
|
||||
struct MAPNIK_DECL text_symbolizer : public symbolizer_base
|
||||
{
|
||||
// Note - we do not use std::make_shared below as VC2008 and VC2010 are
|
||||
// not able to compile make_shared used within a constructor
|
||||
text_symbolizer(text_placements_ptr placements = text_placements_ptr(new text_placements_dummy));
|
||||
text_symbolizer(expression_ptr name, std::string const& face_name,
|
||||
double size, color const& fill,
|
||||
text_placements_ptr placements = text_placements_ptr(new text_placements_dummy)
|
||||
);
|
||||
text_symbolizer(expression_ptr name, double size, color const& fill,
|
||||
text_placements_ptr placements = text_placements_ptr(new text_placements_dummy)
|
||||
);
|
||||
text_symbolizer(text_symbolizer const& rhs);
|
||||
text_symbolizer& operator=(text_symbolizer const& rhs);
|
||||
expression_ptr get_name() const func_deprecated;
|
||||
void set_name(expression_ptr expr);
|
||||
|
||||
expression_ptr get_orientation() const func_deprecated; // orienation (rotation angle atm)
|
||||
void set_orientation(expression_ptr expr);
|
||||
|
||||
double get_text_ratio() const func_deprecated; // target ratio for text bounding box in pixels
|
||||
void set_text_ratio(double ratio);
|
||||
double get_wrap_width() const func_deprecated; // width to wrap text at, or trigger ratio
|
||||
void set_wrap_width(double width);
|
||||
unsigned char get_wrap_char() const func_deprecated; // character used to wrap lines
|
||||
std::string get_wrap_char_string() const func_deprecated; // character used to wrap lines as std::string
|
||||
void set_wrap_char(unsigned char character);
|
||||
void set_wrap_char_from_string(std::string const& character);
|
||||
text_transform_e get_text_transform() const func_deprecated; // text conversion on strings before display
|
||||
void set_text_transform(text_transform_e convert);
|
||||
double get_line_spacing() const func_deprecated; // spacing between lines of text
|
||||
void set_line_spacing(double spacing);
|
||||
double get_character_spacing() const func_deprecated; // spacing between characters in text
|
||||
void set_character_spacing(double spacing);
|
||||
double get_label_spacing() const func_deprecated; // spacing between repeated labels on lines
|
||||
void set_label_spacing(double spacing);
|
||||
unsigned get_label_position_tolerance() const func_deprecated; //distance the label can be moved on the line to fit, if 0 the default is used
|
||||
void set_label_position_tolerance(unsigned tolerance);
|
||||
bool get_force_odd_labels() const func_deprecated; // try render an odd amount of labels
|
||||
void set_force_odd_labels(bool force);
|
||||
double get_max_char_angle_delta() const func_deprecated; // maximum change in angle between adjacent characters
|
||||
void set_max_char_angle_delta(double angle);
|
||||
double get_text_size() const func_deprecated;
|
||||
void set_text_size(double size);
|
||||
std::string const& get_face_name() const func_deprecated;
|
||||
void set_face_name(std::string face_name);
|
||||
boost::optional<font_set> const& get_fontset() const func_deprecated;
|
||||
void set_fontset(font_set const& fset);
|
||||
color const& get_fill() const func_deprecated;
|
||||
void set_fill(color const& fill);
|
||||
void set_halo_fill(color const& fill);
|
||||
color const& get_halo_fill() const func_deprecated;
|
||||
void set_halo_radius(double radius);
|
||||
double get_halo_radius() const func_deprecated;
|
||||
void set_halo_rasterizer(halo_rasterizer_e rasterizer_p);
|
||||
halo_rasterizer_e get_halo_rasterizer() const;
|
||||
void set_label_placement(label_placement_e label_p);
|
||||
label_placement_e get_label_placement() const func_deprecated;
|
||||
void set_vertical_alignment(vertical_alignment_e valign);
|
||||
vertical_alignment_e get_vertical_alignment() const func_deprecated;
|
||||
void set_displacement(double x, double y);
|
||||
void set_displacement(pixel_position const& p);
|
||||
pixel_position const& get_displacement() const func_deprecated;
|
||||
void set_avoid_edges(bool avoid);
|
||||
bool get_avoid_edges() const func_deprecated;
|
||||
void set_minimum_distance(double distance);
|
||||
double get_minimum_distance() const func_deprecated;
|
||||
void set_minimum_padding(double distance);
|
||||
double get_minimum_padding() const func_deprecated;
|
||||
void set_minimum_path_length(double size);
|
||||
double get_minimum_path_length() const;
|
||||
void set_allow_overlap(bool overlap);
|
||||
bool get_allow_overlap() const func_deprecated;
|
||||
void set_text_opacity(double opacity);
|
||||
double get_text_opacity() const func_deprecated;
|
||||
void set_wrap_before(bool wrap_before);
|
||||
bool get_wrap_before() const func_deprecated; // wrap text at wrap_char immediately before current work
|
||||
void set_horizontal_alignment(horizontal_alignment_e valign);
|
||||
horizontal_alignment_e get_horizontal_alignment() const func_deprecated;
|
||||
void set_justify_alignment(justify_alignment_e valign);
|
||||
justify_alignment_e get_justify_alignment() const func_deprecated;
|
||||
text_placements_ptr get_placement_options() const;
|
||||
void set_placement_options(text_placements_ptr placement_options);
|
||||
void set_largest_bbox_only(bool val);
|
||||
bool largest_bbox_only() const;
|
||||
private:
|
||||
text_placements_ptr placement_options_;
|
||||
halo_rasterizer_e halo_rasterizer_;
|
||||
};
|
||||
}
|
||||
*/
|
||||
#endif // MAPNIK_TEXT_SYMBOLIZER_HPP
|
|
@ -1,494 +0,0 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* This file is part of Mapnik (c++ mapping toolkit)
|
||||
*
|
||||
* Copyright (C) 2011 Artem Pavlenko
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
//mapnik
|
||||
#include <mapnik/debug.hpp>
|
||||
#include <mapnik/text_symbolizer.hpp>
|
||||
#include <mapnik/enumeration.hpp>
|
||||
#include <mapnik/formatting/text.hpp>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
static const char * halo_rasterizer_strings[] = {
|
||||
"full",
|
||||
"fast",
|
||||
""
|
||||
};
|
||||
|
||||
IMPLEMENT_ENUM( halo_rasterizer_e, halo_rasterizer_strings )
|
||||
|
||||
|
||||
static const char * label_placement_strings[] = {
|
||||
"point",
|
||||
"line",
|
||||
"vertex",
|
||||
"interior",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_ENUM( label_placement_e, label_placement_strings )
|
||||
|
||||
static const char * vertical_alignment_strings[] = {
|
||||
"top",
|
||||
"middle",
|
||||
"bottom",
|
||||
"auto",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_ENUM( vertical_alignment_e, vertical_alignment_strings )
|
||||
|
||||
static const char * horizontal_alignment_strings[] = {
|
||||
"left",
|
||||
"middle",
|
||||
"right",
|
||||
"auto",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_ENUM( horizontal_alignment_e, horizontal_alignment_strings )
|
||||
|
||||
static const char * justify_alignment_strings[] = {
|
||||
"left",
|
||||
"center", // not 'middle' in order to match CSS
|
||||
"right",
|
||||
"auto",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_ENUM( justify_alignment_e, justify_alignment_strings )
|
||||
|
||||
static const char * text_transform_strings[] = {
|
||||
"none",
|
||||
"uppercase",
|
||||
"lowercase",
|
||||
"capitalize",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_ENUM( text_transform_e, text_transform_strings )
|
||||
|
||||
#if 0
|
||||
text_symbolizer::text_symbolizer(text_placements_ptr placements)
|
||||
: symbolizer_base(),
|
||||
placement_options_(placements),
|
||||
halo_rasterizer_(HALO_RASTERIZER_FULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
text_symbolizer::text_symbolizer(expression_ptr name, std::string const& face_name,
|
||||
float size, color const& fill,
|
||||
text_placements_ptr placements)
|
||||
: symbolizer_base(),
|
||||
placement_options_(placements),
|
||||
halo_rasterizer_(HALO_RASTERIZER_FULL)
|
||||
{
|
||||
set_name(name);
|
||||
set_face_name(face_name);
|
||||
set_text_size(size);
|
||||
set_fill(fill);
|
||||
}
|
||||
|
||||
text_symbolizer::text_symbolizer(expression_ptr name, float size, color const& fill,
|
||||
text_placements_ptr placements)
|
||||
: symbolizer_base(),
|
||||
placement_options_(placements),
|
||||
halo_rasterizer_(HALO_RASTERIZER_FULL)
|
||||
{
|
||||
set_name(name);
|
||||
set_text_size(size);
|
||||
set_fill(fill);
|
||||
}
|
||||
|
||||
text_symbolizer::text_symbolizer(text_symbolizer const& rhs)
|
||||
: symbolizer_base(rhs),
|
||||
placement_options_(rhs.placement_options_),
|
||||
halo_rasterizer_(rhs.halo_rasterizer_)
|
||||
/*TODO: Copy options! */
|
||||
{
|
||||
}
|
||||
|
||||
text_symbolizer& text_symbolizer::operator=(text_symbolizer const& other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
placement_options_ = other.placement_options_; /*TODO: Copy options? */
|
||||
halo_rasterizer_ = other.halo_rasterizer_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
expression_ptr text_symbolizer::get_name() const
|
||||
{
|
||||
formatting::text_node *node = dynamic_cast<formatting::text_node *>(placement_options_->defaults.format_tree().get());
|
||||
if (!node) return expression_ptr();
|
||||
return node->get_text();
|
||||
}
|
||||
|
||||
void text_symbolizer::set_name(expression_ptr name)
|
||||
{
|
||||
placement_options_->defaults.set_old_style_expression(name);
|
||||
}
|
||||
|
||||
expression_ptr text_symbolizer::get_orientation() const
|
||||
{
|
||||
return placement_options_->defaults.orientation;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_orientation(expression_ptr orientation)
|
||||
{
|
||||
placement_options_->defaults.orientation = orientation;
|
||||
}
|
||||
|
||||
std::string const& text_symbolizer::get_face_name() const
|
||||
{
|
||||
return placement_options_->defaults.format.face_name;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_face_name(std::string face_name)
|
||||
{
|
||||
placement_options_->defaults.format.face_name = face_name;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_fontset(font_set const& fontset)
|
||||
{
|
||||
placement_options_->defaults.format.fontset = fontset;
|
||||
}
|
||||
|
||||
boost::optional<font_set> const& text_symbolizer::get_fontset() const
|
||||
{
|
||||
return placement_options_->defaults.format.fontset;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_text_ratio() const
|
||||
{
|
||||
return placement_options_->defaults.text_ratio;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_text_ratio(double ratio)
|
||||
{
|
||||
placement_options_->defaults.text_ratio = ratio;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_wrap_width() const
|
||||
{
|
||||
return placement_options_->defaults.wrap_width;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_wrap_width(double width)
|
||||
{
|
||||
placement_options_->defaults.wrap_width = width;
|
||||
}
|
||||
|
||||
bool text_symbolizer::get_wrap_before() const
|
||||
{
|
||||
return placement_options_->defaults.format.wrap_before;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_wrap_before(bool wrap_before)
|
||||
{
|
||||
placement_options_->defaults.format.wrap_before = wrap_before;
|
||||
}
|
||||
|
||||
unsigned char text_symbolizer::get_wrap_char() const
|
||||
{
|
||||
return placement_options_->defaults.format.wrap_char;
|
||||
}
|
||||
|
||||
std::string text_symbolizer::get_wrap_char_string() const
|
||||
{
|
||||
return std::string(1, placement_options_->defaults.format.wrap_char);
|
||||
}
|
||||
|
||||
void text_symbolizer::set_wrap_char(unsigned char character)
|
||||
{
|
||||
placement_options_->defaults.format.wrap_char = character;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_wrap_char_from_string(std::string const& character)
|
||||
{
|
||||
placement_options_->defaults.format.wrap_char = (character)[0];
|
||||
}
|
||||
|
||||
text_transform_e text_symbolizer::get_text_transform() const
|
||||
{
|
||||
return placement_options_->defaults.format.text_transform;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_text_transform(text_transform_e convert)
|
||||
{
|
||||
placement_options_->defaults.format.text_transform = convert;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_line_spacing() const
|
||||
{
|
||||
return placement_options_->defaults.format.line_spacing;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_line_spacing(double spacing)
|
||||
{
|
||||
placement_options_->defaults.format.line_spacing = spacing;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_character_spacing() const
|
||||
{
|
||||
return placement_options_->defaults.format.character_spacing;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_character_spacing(double spacing)
|
||||
{
|
||||
placement_options_->defaults.format.character_spacing = spacing;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_label_spacing() const
|
||||
{
|
||||
return placement_options_->defaults.label_spacing;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_label_spacing(double spacing)
|
||||
{
|
||||
placement_options_->defaults.label_spacing = spacing;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_label_position_tolerance() const
|
||||
{
|
||||
return placement_options_->defaults.label_position_tolerance;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_label_position_tolerance(double tolerance)
|
||||
{
|
||||
placement_options_->defaults.label_position_tolerance = tolerance;
|
||||
}
|
||||
|
||||
bool text_symbolizer::get_force_odd_labels() const
|
||||
{
|
||||
return placement_options_->defaults.force_odd_labels;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_force_odd_labels(bool force)
|
||||
{
|
||||
placement_options_->defaults.force_odd_labels = force;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_max_char_angle_delta() const
|
||||
{
|
||||
return placement_options_->defaults.max_char_angle_delta;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_max_char_angle_delta(double angle)
|
||||
{
|
||||
placement_options_->defaults.max_char_angle_delta = angle;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_text_size(double size)
|
||||
{
|
||||
placement_options_->defaults.format.text_size = size;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_text_size() const
|
||||
{
|
||||
return placement_options_->defaults.format.text_size;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_fill(color const& fill)
|
||||
{
|
||||
placement_options_->defaults.format.fill = fill;
|
||||
}
|
||||
|
||||
color const& text_symbolizer::get_fill() const
|
||||
{
|
||||
return placement_options_->defaults.format.fill;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_halo_fill(color const& fill)
|
||||
{
|
||||
placement_options_->defaults.format.halo_fill = fill;
|
||||
}
|
||||
|
||||
color const& text_symbolizer::get_halo_fill() const
|
||||
{
|
||||
return placement_options_->defaults.format.halo_fill;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_halo_radius(double radius)
|
||||
{
|
||||
placement_options_->defaults.format.halo_radius = radius;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_halo_radius() const
|
||||
{
|
||||
return placement_options_->defaults.format.halo_radius;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_halo_rasterizer(halo_rasterizer_e rasterizer_p)
|
||||
{
|
||||
halo_rasterizer_ = rasterizer_p;
|
||||
}
|
||||
|
||||
halo_rasterizer_e text_symbolizer::get_halo_rasterizer() const
|
||||
{
|
||||
return halo_rasterizer_;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_label_placement(label_placement_e label_p)
|
||||
{
|
||||
placement_options_->defaults.label_placement = label_p;
|
||||
}
|
||||
|
||||
label_placement_e text_symbolizer::get_label_placement() const
|
||||
{
|
||||
return placement_options_->defaults.label_placement;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_displacement(double x, double y)
|
||||
{
|
||||
placement_options_->defaults.displacement = std::make_pair(x,y);
|
||||
}
|
||||
|
||||
void text_symbolizer::set_displacement(position const& p)
|
||||
{
|
||||
placement_options_->defaults.displacement = p;
|
||||
}
|
||||
|
||||
position const& text_symbolizer::get_displacement() const
|
||||
{
|
||||
return placement_options_->defaults.displacement;
|
||||
}
|
||||
|
||||
bool text_symbolizer::get_avoid_edges() const
|
||||
{
|
||||
return placement_options_->defaults.avoid_edges;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_avoid_edges(bool avoid)
|
||||
{
|
||||
placement_options_->defaults.avoid_edges = avoid;
|
||||
}
|
||||
|
||||
bool text_symbolizer::largest_bbox_only() const
|
||||
{
|
||||
return placement_options_->defaults.largest_bbox_only;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_largest_bbox_only(bool v)
|
||||
{
|
||||
placement_options_->defaults.largest_bbox_only = v;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_minimum_distance() const
|
||||
{
|
||||
return placement_options_->defaults.minimum_distance;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_minimum_distance(double distance)
|
||||
{
|
||||
placement_options_->defaults.minimum_distance = distance;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_minimum_padding() const
|
||||
{
|
||||
return placement_options_->defaults.minimum_padding;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_minimum_padding(double distance)
|
||||
{
|
||||
placement_options_->defaults.minimum_padding = distance;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_minimum_path_length() const
|
||||
{
|
||||
return placement_options_->defaults.minimum_path_length;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_minimum_path_length(double size)
|
||||
{
|
||||
placement_options_->defaults.minimum_path_length = size;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_allow_overlap(bool overlap)
|
||||
{
|
||||
placement_options_->defaults.allow_overlap = overlap;
|
||||
}
|
||||
|
||||
bool text_symbolizer::get_allow_overlap() const
|
||||
{
|
||||
return placement_options_->defaults.allow_overlap;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_text_opacity(double text_opacity)
|
||||
{
|
||||
placement_options_->defaults.format.text_opacity = text_opacity;
|
||||
}
|
||||
|
||||
double text_symbolizer::get_text_opacity() const
|
||||
{
|
||||
return placement_options_->defaults.format.text_opacity;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_vertical_alignment(vertical_alignment_e valign)
|
||||
{
|
||||
placement_options_->defaults.valign = valign;
|
||||
}
|
||||
|
||||
vertical_alignment_e text_symbolizer::get_vertical_alignment() const
|
||||
{
|
||||
return placement_options_->defaults.valign;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_horizontal_alignment(horizontal_alignment_e halign)
|
||||
{
|
||||
placement_options_->defaults.halign = halign;
|
||||
}
|
||||
|
||||
horizontal_alignment_e text_symbolizer::get_horizontal_alignment() const
|
||||
{
|
||||
return placement_options_->defaults.halign;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_justify_alignment(justify_alignment_e jalign)
|
||||
{
|
||||
placement_options_->defaults.jalign = jalign;
|
||||
}
|
||||
|
||||
justify_alignment_e text_symbolizer::get_justify_alignment() const
|
||||
{
|
||||
return placement_options_->defaults.jalign;
|
||||
}
|
||||
|
||||
text_placements_ptr text_symbolizer::get_placement_options() const
|
||||
{
|
||||
return placement_options_;
|
||||
}
|
||||
|
||||
void text_symbolizer::set_placement_options(text_placements_ptr placement_options)
|
||||
{
|
||||
placement_options_ = placement_options;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
Loading…
Reference in a new issue