Loading...
Searching...
No Matches
PointPlacement.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/PointPlacement.h
22
23 \brief A PointPlacement specifies how a text label should be rendered relative to a geometric point.
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_POINTPLACEMENT_H
27#define __TERRALIB_SE_INTERNAL_POINTPLACEMENT_H
28
29// TerraLib
30#include "Config.h"
31
32// Boost
33#include <boost/noncopyable.hpp>
34
35namespace te
36{
37 namespace se
38 {
39// Forward declarations
40 class AnchorPoint;
41 class Displacement;
42 class ParameterValue;
43
44 /*!
45 \class PointPlacement
46
47 \brief A PointPlacement specifies how a text label should be rendered relative to a geometric point.
48
49 For a PointPlacement, the anchor point of
50 the label and a linear displacement from the
51 point can be specified, to allow a graphic
52 Symbolizer to be plotted directly at the point.
53 This might be useful to label a city, for example.
54 The AnchorPoint element of a PointPlacement gives
55 the location inside of a label to use for anchoring
56 the label to the main-geometry point. The Displacement
57 element of a PointPlacement gives the X and Y
58 displacements from the main-geometry point to
59 render a text label.
60 This will often be used to avoid over-plotting
61 a graphic symbol marking a city or some such
62 feature. The displacements are in units of pixels
63 above and to the right of the point. A system may
64 reflect this displacement about the X and/or Y axes
65 to de-conflict labels. The default displacement is
66 X = 0, Y = 0.
67 The Rotation of a PointPlacement gives the clockwise
68 rotation of the label in degrees from the normal
69 direction for a font (left-to-right for
70 Latin-derived human languages at least).
71
72 \sa LabelPlacement, AnchorPoint, Displacement, ParameterValue
73 */
74 class TESEEXPORT PointPlacement : public boost::noncopyable
75 {
76 public:
77
78 /** @name Initializer Methods
79 * Methods related to instantiation and destruction.
80 */
81 //@{
82
83 /*! \brief It initializes a new PointPlacement. */
85
86 /*! \brief Destructor. */
88
89 //@}
90
91 /** @name Accessor methods
92 * Methods used to get or set properties.
93 */
94 //@{
95
97
98 const AnchorPoint* getAnchorPoint() const { return m_anchorPoint; }
99
101
102 const Displacement* getDisplacement() const { return m_displacement; }
103
105
106 const ParameterValue* getRotation() const { return m_rotation; }
107
108 //@}
109
110 /*! \brief It creates a new copy of this object. */
112
113 private:
114
115 AnchorPoint* m_anchorPoint; //!< It identifies the location inside of a text label to use an an 'anchor' for positioning it relative to a point geometry. (Optional)
116 Displacement* m_displacement; //!< It gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer near a point. (Optional)
117 ParameterValue* m_rotation; //!< The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. (Optional)
118 };
119
120 } // end namespace se
121} // end namespace te
122
123#endif // __TERRALIB_SE_INTERNAL_POINTPLACEMENT_H
An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it r...
Definition: AnchorPoint.h:64
A Displacement gives X and Y offset displacements to use for rendering a text label,...
Definition: Displacement.h:59
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
A PointPlacement specifies how a text label should be rendered relative to a geometric point.
const Displacement * getDisplacement() const
PointPlacement * clone() const
It creates a new copy of this object.
void setDisplacement(Displacement *d)
Displacement * m_displacement
It gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer ...
void setAnchorPoint(AnchorPoint *a)
const ParameterValue * getRotation() const
const AnchorPoint * getAnchorPoint() const
PointPlacement()
It initializes a new PointPlacement.
ParameterValue * m_rotation
The Rotation element gives the rotation of a graphic in the clockwise direction about its center poin...
AnchorPoint * m_anchorPoint
It identifies the location inside of a text label to use an an 'anchor' for positioning it relative t...
void setRotation(ParameterValue *r)
~PointPlacement()
Destructor.
TerraLib.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201
Proxy configuration file for TerraView (see terraview_config.h).