AnchorPoint.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/AnchorPoint.h
22 
23  \brief An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it relative to a point geometry.
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_ANCHORPOINT_H
27 #define __TERRALIB_SE_INTERNAL_ANCHORPOINT_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 declaration
40  class ParameterValue;
41 
42  /*!
43  \class AnchorPoint
44 
45  \brief An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it relative to a point geometry.
46 
47  The AnchorPoint element of a PointSymbolizer
48  gives the location inside of a Graphic (or label)
49  to use for anchoring the graphic to the
50  main-geometry point. The coordinates are given as
51  two floating-point numbers in the AnchorPointX and AnchorPointY
52  elements each with values between 0.0 and 1.0 inclusive.
53  The bounding box of the graphic/label to be rendered is considered
54  to be in a coordinate space from 0.0 (lower-left corner) to
55  1.0 (upper-right corner), and the anchor position is specified
56  as a point in this space. The default point is X = 0.5, Y = 0.5,
57  which is at the middle height and middle length of the
58  graphic/label text. A system may choose different anchor
59  points to de-conflict graphics/labels.
60 
61  \sa Graphic, ParameterValue, PointPlacement
62  */
63  class TESEEXPORT AnchorPoint : public boost::noncopyable
64  {
65  public:
66 
67  /** @name Initializer Methods
68  * Methods related to instantiation and destruction.
69  */
70  //@{
71 
72  /*! \brief It initializes a new AnchorPoint. */
73  AnchorPoint();
74 
75  /*! \brief Destructor. */
76  ~AnchorPoint();
77 
78  //@}
79 
80  /** @name Accessor methods
81  * Methods used to get or set properties.
82  */
83  //@{
84 
85  void setAnchorPointX(ParameterValue* x);
86 
87  const ParameterValue* getAnchorPointX() const;
88 
89  void setAnchorPointY(ParameterValue* y);
90 
91  const ParameterValue* getAnchorPointY() const;
92 
93  //@}
94 
95  /*! \brief It creates a new copy of this object. */
96  AnchorPoint* clone() const;
97 
98  private:
99 
100  ParameterValue* m_x; //!< Floating-point number of the the coordinate to anchoring (default = 0.5).
101  ParameterValue* m_y; //!< Floating-point number of the the coordinate to anchoring (default = 0.5).
102  };
103 
104  } // end namespace se
105 } // end namespace te
106 
107 #endif // __TERRALIB_SE_INTERNAL_ANCHORPOINT_H
108 
ParameterValue * m_y
Floating-point number of the the coordinate to anchoring (default = 0.5).
Definition: AnchorPoint.h:101
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it r...
Definition: AnchorPoint.h:63
ParameterValue * m_x
Floating-point number of the the coordinate to anchoring (default = 0.5).
Definition: AnchorPoint.h:100
URI C++ Library.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:187
Configuration flags for the Symbology Encoding support of TerraLib.