A TextSymbolizer is used to render text labels according to various graphical parameters. More...
#include <TextSymbolizer.h>
Public Types | |
typedef R | ReturnType |
typedef Visitor | VisitorType |
Public Member Functions | |
virtual ReturnType | accept (VisitorType &guest) const =0 |
It call the visit method from the guest object. More... | |
Symbolizer * | clone () const |
It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
TextSymbolizer () | |
It initializes a new TextSymbolizer. More... | |
TextSymbolizer (const TextSymbolizer &rhs) | |
Copy constructor. More... | |
~TextSymbolizer () | |
Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
void | setGeometry (te::fe::PropertyName *g) |
void | setLabel (ParameterValue *l) |
const ParameterValue * | getLabel () const |
void | setFont (Font *f) |
const Font * | getFont () const |
void | setLabelPlacement (LabelPlacement *l) |
const LabelPlacement * | getLabelPlacement () const |
void | setHalo (Halo *h) |
const Halo * | getHalo () const |
void | setFill (Fill *f) |
const Fill * | getFill () const |
const std::string & | getType () const |
It returns the symbolizer type. More... | |
Accessor methods | |
Methods used to get or set properties. | |
void | setName (const std::string &name) |
const std::string & | getName () const |
void | setDescription (Description *d) |
const Description * | getDescription () const |
void | setBaseSymbolizer (te::xl::SimpleLink *baseSymbolizer) |
const te::xl::SimpleLink * | getBaseSymbolizer () const |
void | setVersion (const std::string &version) |
const std::string & | getVersion () const |
void | setUom (const te::common::BaseUnitOfMeasure *uom) |
It sets the unit-of-measure. More... | |
const te::common::BaseUnitOfMeasure * | getUom () const |
Private Attributes | |
Fill * | m_fill |
It specifies how the text area will be filled. (Optional) More... | |
Font * | m_font |
The font element specifies the text font to use. (Optional) More... | |
te::fe::PropertyName * | m_geometry |
The Geometry will be interpreted as a point or a line as needed by the LabelPlacement. (Optional) More... | |
Halo * | m_halo |
A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional) More... | |
ParameterValue * | m_label |
The label specifies the textual content to be rendered. (Optional) More... | |
LabelPlacement * | m_labelPlacement |
The label placement specifies where and how a text label should be rendered relative to a geometry. (Optional) More... | |
Static Private Attributes | |
static const std::string | sm_type |
A static data member used in the implementation of getType method. More... | |
A TextSymbolizer is used to render text labels according to various graphical parameters.
In this case, if a line, polygon, or raster geometry is used with this Symbolizer, then the semantic is to use the centroid of the geometry, or any similar representative point.
Definition at line 62 of file TextSymbolizer.h.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
te::se::TextSymbolizer::TextSymbolizer | ( | ) |
It initializes a new TextSymbolizer.
Definition at line 37 of file TextSymbolizer.cpp.
te::se::TextSymbolizer::TextSymbolizer | ( | const TextSymbolizer & | rhs | ) |
Copy constructor.
rhs | The other text symbolizer. |
Definition at line 48 of file TextSymbolizer.cpp.
References te::se::LabelPlacement::clone(), te::se::Halo::clone(), te::se::Fill::clone(), te::se::ParameterValue::clone(), te::se::Font::clone(), te::fe::PropertyName::getName(), m_fill, m_font, m_geometry, m_halo, m_label, and m_labelPlacement.
te::se::TextSymbolizer::~TextSymbolizer | ( | ) |
Destructor.
Definition at line 76 of file TextSymbolizer.cpp.
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
|
virtual |
It creates a new copy of this object.
Implements te::se::Symbolizer.
Definition at line 152 of file TextSymbolizer.cpp.
|
inherited |
Definition at line 94 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 83 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
const te::se::Fill * te::se::TextSymbolizer::getFill | ( | ) | const |
Definition at line 142 of file TextSymbolizer.cpp.
Referenced by TextSymbolizerWriter(), and te::map::CanvasConfigurer::visit().
const te::se::Font * te::se::TextSymbolizer::getFont | ( | ) | const |
Definition at line 109 of file TextSymbolizer.cpp.
Referenced by TextSymbolizerWriter(), and te::map::CanvasConfigurer::visit().
const te::se::Halo * te::se::TextSymbolizer::getHalo | ( | ) | const |
Definition at line 131 of file TextSymbolizer.cpp.
Referenced by TextSymbolizerWriter(), and te::map::CanvasConfigurer::visit().
const te::se::ParameterValue * te::se::TextSymbolizer::getLabel | ( | ) | const |
Definition at line 98 of file TextSymbolizer.cpp.
Referenced by TextSymbolizerWriter().
const te::se::LabelPlacement * te::se::TextSymbolizer::getLabelPlacement | ( | ) | const |
Definition at line 120 of file TextSymbolizer.cpp.
Referenced by TextSymbolizerWriter().
|
inherited |
Definition at line 72 of file Symbolizer.cpp.
Referenced by te::layout::LegendChildModel::drawLegend(), te::layout::LegendModel::drawStyleLegend(), and te::se::serialize::WriteSymbolizerHelper().
|
virtual |
It returns the symbolizer type.
Implements te::se::Symbolizer.
Definition at line 147 of file TextSymbolizer.cpp.
|
inherited |
Definition at line 114 of file Symbolizer.cpp.
|
inherited |
Definition at line 104 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 88 of file Symbolizer.cpp.
|
inherited |
Definition at line 77 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
void te::se::TextSymbolizer::setFill | ( | Fill * | f | ) |
Definition at line 136 of file TextSymbolizer.cpp.
Referenced by te::se::CreateTextSymbolizer().
void te::se::TextSymbolizer::setFont | ( | Font * | f | ) |
Definition at line 103 of file TextSymbolizer.cpp.
Referenced by te::se::CreateTextSymbolizer().
void te::se::TextSymbolizer::setGeometry | ( | te::fe::PropertyName * | g | ) |
Definition at line 86 of file TextSymbolizer.cpp.
void te::se::TextSymbolizer::setHalo | ( | Halo * | h | ) |
Definition at line 125 of file TextSymbolizer.cpp.
void te::se::TextSymbolizer::setLabel | ( | ParameterValue * | l | ) |
Definition at line 92 of file TextSymbolizer.cpp.
Referenced by te::se::CreateTextSymbolizer().
void te::se::TextSymbolizer::setLabelPlacement | ( | LabelPlacement * | l | ) |
Definition at line 114 of file TextSymbolizer.cpp.
|
inherited |
Definition at line 67 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
|
inherited |
It sets the unit-of-measure.
All Symbolizers include an optional gml:uom-attribute as used by GML (this is set inside the abstract SymbolizerType and therefore inherited by all Symbolizers). This applies to all elements included inside a Symbolizer such as stroke-width, size, font-size, Gap, InitialGap, Displacement and PerpendicularOffset. If no uom is set inside of Symbolizer, all units are measured in pixel, the behaviour used by SLD 1.0.0. The following uom definitions are recommended to be used:
Definition at line 109 of file Symbolizer.cpp.
|
inherited |
Definition at line 99 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
|
private |
It specifies how the text area will be filled. (Optional)
Definition at line 129 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
private |
The font element specifies the text font to use. (Optional)
Definition at line 126 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
private |
The Geometry will be interpreted as a point or a line as needed by the LabelPlacement. (Optional)
Definition at line 124 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
private |
A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional)
Definition at line 128 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
private |
The label specifies the textual content to be rendered. (Optional)
Definition at line 125 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
private |
The label placement specifies where and how a text label should be rendered relative to a geometry. (Optional)
Definition at line 127 of file TextSymbolizer.h.
Referenced by TextSymbolizer().
|
staticprivate |
A static data member used in the implementation of getType method.
Definition at line 131 of file TextSymbolizer.h.