Loading...
Searching...
No Matches
TextSymbolizer.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/se/TextSymbolizer.h
22
23 \brief A TextSymbolizer is used to render text labels according to various graphical parameters.
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_TEXTSYMBOLIZER_H
27#define __TERRALIB_SE_INTERNAL_TEXTSYMBOLIZER_H
28
29// TerraLib
30#include "Symbolizer.h"
31
32namespace te
33{
34// Forward declarations
35 namespace fe { class PropertyName; }
36
37 namespace se
38 {
39// Forward declarations
40 class Fill;
41 class Font;
42 class Halo;
43 class LabelPlacement;
44 class ParameterValue;
45
46 /*!
47 \class TextSymbolizer
48
49 \brief A TextSymbolizer is used to render text labels according to various graphical parameters.
50
51 In this case, if a line, polygon, or raster geometry
52 is used with this Symbolizer, then the semantic is to
53 use the centroid of the geometry, or any similar
54 representative point.
55
56 \ingroup se
57
58 \sa Symbolizer, ParameterValue, Font, LabelPlacement, Halo, Fill, te::fe::PropertyName
59
60 \note If a Label element is not provided in a TextSymbolizer, then no text shall be rendered.
61 */
63 {
65
66 public:
67
68 /** @name Initializer Methods
69 * Methods related to instantiation and destruction.
70 */
71 //@{
72
73 /*! \brief It initializes a new TextSymbolizer. */
75
76 /*!
77 \brief Copy constructor.
78
79 \param rhs The other text symbolizer.
80 */
82
83 /*! \brief Destructor. */
85
86 //@}
87
88 /** @name Accessor methods
89 * Methods used to get or set properties.
90 */
91 //@{
92
94
96
97 const ParameterValue* getLabel() const;
98
99 void setFont(Font* f);
100
101 const Font* getFont() const;
102
104
106
107 void setHalo(Halo* h);
108
109 const Halo* getHalo() const;
110
111 void setFill(Fill* f);
112
113 const Fill* getFill() const;
114
115 const std::string& getType() const;
116
117 //@}
118
119 /*! \brief It creates a new copy of this object. */
121
122 private:
123
124 te::fe::PropertyName* m_geometry; //!< The Geometry will be interpreted as a point or a line as needed by the LabelPlacement. (Optional)
125 ParameterValue* m_label; //!< The label specifies the textual content to be rendered. (Optional)
126 Font* m_font; //!< The font element specifies the text font to use. (Optional)
127 LabelPlacement* m_labelPlacement; //!< The label placement specifies where and how a text label should be rendered relative to a geometry. (Optional)
128 Halo* m_halo; //!< A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional)
129 Fill* m_fill; //!< It specifies how the text area will be filled. (Optional)
130
131 static const std::string sm_type; //!< A static data member used in the implementation of getType method.
132 };
133
134 } // end namespace se
135} // end namespace te
136
137#endif // __TERRALIB_SE_INTERNAL_TEXTSYMBOLIZER_H
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
A Symbolizer describes how a Feature is to appear on a map.
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:55
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:60
A Font specifies the text font to use in a text symbolizer.
Definition: Font.h:64
A Halo is a type of Fill that is applied to the backgrounds of font glyphs.
Definition: Halo.h:65
The LabelPlacement specifies where and how a text label should be rendered relative to a geometry.
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
A TextSymbolizer is used to render text labels according to various graphical parameters.
ParameterValue * m_label
The label specifies the textual content to be rendered. (Optional)
void setFont(Font *f)
Fill * m_fill
It specifies how the text area will be filled. (Optional)
void setHalo(Halo *h)
void setGeometry(te::fe::PropertyName *g)
void setLabel(ParameterValue *l)
static const std::string sm_type
A static data member used in the implementation of getType method.
te::fe::PropertyName * m_geometry
The Geometry will be interpreted as a point or a line as needed by the LabelPlacement....
LabelPlacement * m_labelPlacement
The label placement specifies where and how a text label should be rendered relative to a geometry....
TextSymbolizer()
It initializes a new TextSymbolizer.
const Halo * getHalo() const
Halo * m_halo
A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional)
const Font * getFont() const
void setFill(Fill *f)
~TextSymbolizer()
Destructor.
Font * m_font
The font element specifies the text font to use. (Optional)
const std::string & getType() const
It returns the symbolizer type.
const ParameterValue * getLabel() const
const Fill * getFill() const
void setLabelPlacement(LabelPlacement *l)
TextSymbolizer(const TextSymbolizer &rhs)
Copy constructor.
Symbolizer * clone() const
It creates a new copy of this object.
const LabelPlacement * getLabelPlacement() const
TerraLib.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201