A TextSymbolizer is used to render text labels according to various graphical parameters. More...
#include <TextSymbolizer.h>
Public Types | |
| typedef void | 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.
Referenced by clone().
| te::se::TextSymbolizer::TextSymbolizer | ( | const TextSymbolizer & | rhs | ) |
Copy constructor.
| rhs | The other text symbolizer. |
Definition at line 47 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 75 of file TextSymbolizer.cpp.
References m_fill, m_font, m_geometry, m_halo, m_label, and m_labelPlacement.
|
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 151 of file TextSymbolizer.cpp.
References TextSymbolizer().
Referenced by te::qt::widgets::TextPropertyItem::getTextSymbolizer(), and te::qt::widgets::TextPropertyItem::setTextSymbolizer().
|
inherited |
Definition at line 94 of file Symbolizer.cpp.
References te::se::Symbolizer::m_baseSymbolizer.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 83 of file Symbolizer.cpp.
References te::se::Symbolizer::m_description.
Referenced by te::se::serialize::WriteSymbolizerHelper().
| const te::se::Fill * te::se::TextSymbolizer::getFill | ( | ) | const |
Definition at line 141 of file TextSymbolizer.cpp.
References m_fill.
Referenced by te::qt::widgets::TextSymbolizerProperty::onTextChanged(), TextSymbolizerWriter(), te::qt::widgets::TextPropertyItem::updateUi(), and te::map::CanvasConfigurer::visit().
| const te::se::Font * te::se::TextSymbolizer::getFont | ( | ) | const |
Definition at line 108 of file TextSymbolizer.cpp.
References m_font.
Referenced by te::qt::widgets::TextSymbolizerProperty::onTextChanged(), TextSymbolizerWriter(), te::qt::widgets::TextPropertyItem::updateUi(), and te::map::CanvasConfigurer::visit().
| const te::se::Halo * te::se::TextSymbolizer::getHalo | ( | ) | const |
Definition at line 130 of file TextSymbolizer.cpp.
References m_halo.
Referenced by te::qt::widgets::TextSymbolizerProperty::setSymbolizer(), TextSymbolizerWriter(), and te::map::CanvasConfigurer::visit().
| const te::se::ParameterValue * te::se::TextSymbolizer::getLabel | ( | ) | const |
Definition at line 97 of file TextSymbolizer.cpp.
References m_label.
Referenced by te::map::AbstractLayerRenderer::drawDatSetTexts(), te::qt::widgets::StyleDockWidget::onSymbolizerSelected(), te::qt::widgets::TextSymbolizerProperty::onTextChanged(), TextSymbolizerWriter(), and te::qt::widgets::TextPropertyItem::updateUi().
| const te::se::LabelPlacement * te::se::TextSymbolizer::getLabelPlacement | ( | ) | const |
Definition at line 119 of file TextSymbolizer.cpp.
References m_labelPlacement.
Referenced by te::qt::widgets::SymbologyPreview::buildText(), te::map::AbstractLayerRenderer::drawDatSetTexts(), te::qt::widgets::TextSymbolizerProperty::onLinePlacementChanged(), te::qt::widgets::TextSymbolizerProperty::onPointPlacementChanged(), te::qt::widgets::TextSymbolizerProperty::setSymbolizer(), and TextSymbolizerWriter().
|
inherited |
Definition at line 72 of file Symbolizer.cpp.
References te::se::Symbolizer::m_name.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
virtual |
It returns the symbolizer type.
Implements te::se::Symbolizer.
Definition at line 146 of file TextSymbolizer.cpp.
References sm_type.
|
inherited |
Definition at line 114 of file Symbolizer.cpp.
References te::se::Symbolizer::m_uom.
|
inherited |
Definition at line 104 of file Symbolizer.cpp.
References te::se::Symbolizer::m_version.
Referenced by te::qt::widgets::CloudDetectionDialog::writeStyle(), and te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 88 of file Symbolizer.cpp.
References te::se::Symbolizer::m_baseSymbolizer.
|
inherited |
Definition at line 77 of file Symbolizer.cpp.
References d, and te::se::Symbolizer::m_description.
Referenced by EncodeStyle(), and te::se::serialize::ReadSymbolizerHelper().
| void te::se::TextSymbolizer::setFill | ( | Fill * | f | ) |
Definition at line 135 of file TextSymbolizer.cpp.
References m_fill.
Referenced by te::se::CreateTextSymbolizer(), te::qt::widgets::TextPropertyItem::onFillChanged(), te::qt::widgets::TextSymbolizerProperty::onTextChanged(), and te::qt::widgets::TextPropertyItem::TextPropertyItem().
| void te::se::TextSymbolizer::setFont | ( | Font * | f | ) |
Definition at line 102 of file TextSymbolizer.cpp.
References m_font.
Referenced by te::se::CreateTextSymbolizer(), te::qt::widgets::TextSymbolizerProperty::onTextChanged(), and te::qt::widgets::TextPropertyItem::valueChanged().
| void te::se::TextSymbolizer::setGeometry | ( | te::fe::PropertyName * | g | ) |
Definition at line 85 of file TextSymbolizer.cpp.
References m_geometry.
Referenced by EncodeStyle().
| void te::se::TextSymbolizer::setHalo | ( | Halo * | h | ) |
Definition at line 124 of file TextSymbolizer.cpp.
References m_halo.
Referenced by te::qt::widgets::TextSymbolizerProperty::onHaloChanged().
| void te::se::TextSymbolizer::setLabel | ( | ParameterValue * | l | ) |
Definition at line 91 of file TextSymbolizer.cpp.
References m_label.
Referenced by te::se::CreateTextSymbolizer(), te::qt::widgets::StyleDockWidget::onSymbolizerSelected(), te::qt::widgets::TextSymbolizerProperty::onTextChanged(), and te::qt::widgets::TextPropertyItem::valueChanged().
| void te::se::TextSymbolizer::setLabelPlacement | ( | LabelPlacement * | l | ) |
Definition at line 113 of file TextSymbolizer.cpp.
References m_labelPlacement.
Referenced by te::qt::widgets::TextSymbolizerProperty::onLinePlacementChanged(), and te::qt::widgets::TextSymbolizerProperty::onPointPlacementChanged().
|
inherited |
Definition at line 67 of file Symbolizer.cpp.
References te::se::Symbolizer::m_name.
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.
References te::se::Symbolizer::m_uom.
|
inherited |
Definition at line 99 of file Symbolizer.cpp.
References te::se::Symbolizer::m_version.
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 getFill(), setFill(), TextSymbolizer(), and ~TextSymbolizer().
|
private |
The font element specifies the text font to use. (Optional)
Definition at line 126 of file TextSymbolizer.h.
Referenced by getFont(), setFont(), TextSymbolizer(), and ~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 setGeometry(), TextSymbolizer(), and ~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 getHalo(), setHalo(), TextSymbolizer(), and ~TextSymbolizer().
|
private |
The label specifies the textual content to be rendered. (Optional)
Definition at line 125 of file TextSymbolizer.h.
Referenced by getLabel(), setLabel(), TextSymbolizer(), and ~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 getLabelPlacement(), setLabelPlacement(), TextSymbolizer(), and ~TextSymbolizer().
|
staticprivate |
A static data member used in the implementation of getType method.
Definition at line 131 of file TextSymbolizer.h.
Referenced by getType().