Halo.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/Halo.h
22 
23  \brief A Halo is a type of Fill that is applied to the backgrounds of font glyphs.
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_HALO_H
27 #define __TERRALIB_SE_INTERNAL_HALO_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // Boost
33 #include <boost/noncopyable.hpp>
34 
35 namespace te
36 {
37  namespace se
38  {
39 // Forward declarations
40  class Fill;
41  class ParameterValue;
42 
43  /*!
44  \class Halo
45 
46  \brief A Halo is a type of Fill that is applied to the backgrounds of font glyphs.
47 
48  A Halo fills an extended area outside the glyphs of a rendered
49  text label to make the label easier to read over a background.
50  The Radius element gives the absolute size of a halo
51  radius in pixels encoded as a floating-point number. The
52  radius is taken from the outside edge of a font glyph to
53  extend the area of coverage of the glyph (and the inside
54  edge of "holes" in the glyphs). The halo of a text label
55  is considered to be a single shape. The default radius is
56  one pixel. Negative values are not allowed. The default
57  halo fill is solid white (Color "#FFFFFF"). The glyph’s
58  fill is plotted on top of the halo. The default font fill
59  is solid black (Color "#000000"). If no Halo is selected
60  in the containing TextSymbolizer, then no halo will be rendered.
61 
62  \sa TextSymbolizer, Fill, ParameterValue
63  */
64  class TESEEXPORT Halo : public boost::noncopyable
65  {
66  public:
67 
68  /** @name Initializer Methods
69  * Methods related to instantiation and destruction.
70  */
71  //@{
72 
73  /*! \brief It initializes a new Halo. */
74  Halo();
75 
76  /*! \brief Destructor. */
77  ~Halo();
78 
79  //@}
80 
81  /** @name Accessor methods
82  * Methods used to get or set properties.
83  */
84  //@{
85 
86  void setRadius(ParameterValue* radius);
87 
88  const ParameterValue* getRadius() const;
89 
90  void setFill(Fill* fill);
91 
92  const Fill* getFill() const;
93 
94  //@}
95 
96  /*! \brief It creates a new copy of this object. */
97  Halo* clone() const;
98 
99  private:
100 
101  ParameterValue* m_radius; //!< The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point number. The radius is taken from the outside edge of a font glyph to extend the area of coverage of the glyph (and the inside edge of 'holes' in the glyphs). The halo of a text label is considered to be a single shape. (Optional)
102  Fill* m_fill; //!< Specifies how the hallo text area will be filled. (Optional)
103  };
104 
105  } // end namespace se
106 } // end namespace te
107 
108 #endif // __TERRALIB_SE_INTERNAL_HALO_H
te::se::Fill
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:60
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::se::Halo::getFill
const Fill * getFill() const
te::se::Halo::clone
Halo * clone() const
It creates a new copy of this object.
te::se::Halo::setRadius
void setRadius(ParameterValue *radius)
te::se::Halo::m_radius
ParameterValue * m_radius
The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point num...
Definition: Halo.h:101
te::se::Halo
A Halo is a type of Fill that is applied to the backgrounds of font glyphs.
Definition: Halo.h:65
te::se::Halo::~Halo
~Halo()
Destructor.
TESEEXPORT
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201
te::se::Halo::setFill
void setFill(Fill *fill)
te::se::Halo::m_fill
Fill * m_fill
Specifies how the hallo text area will be filled. (Optional)
Definition: Halo.h:102
te::se::Halo::getRadius
const ParameterValue * getRadius() const
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::se::Halo::Halo
Halo()
It initializes a new Halo.
te::se::ParameterValue
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
Definition: ParameterValue.h:55