All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PointPlacement.cpp
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.cpp
22 
23  \brief A PointPlacement specifies how a text label should be rendered relative to a geometric point.
24 */
25 
26 // TerraLib
27 #include "AnchorPoint.h"
28 #include "Displacement.h"
29 #include "ParameterValue.h"
30 #include "PointPlacement.h"
31 
33  : m_anchorPoint(0),
34  m_displacement(0),
35  m_rotation(0)
36 {
37 }
38 
40 {
41  delete m_anchorPoint;
42  delete m_displacement;
43  delete m_rotation;
44 }
45 
47 {
48  delete m_anchorPoint;
49  m_anchorPoint = a;
50 }
51 
53 {
54  delete m_displacement;
55  m_displacement = d;
56 }
57 
59 {
60  delete m_rotation;
61  m_rotation = r;
62 }
63 
65 {
67 
68  if(m_anchorPoint)
69  pp->setAnchorPoint(m_anchorPoint->clone());
70 
71  if(m_displacement)
72  pp->setDisplacement(m_displacement->clone());
73 
74  if(m_rotation)
75  pp->setRotation(m_rotation->clone());
76 
77  return pp;
78 }
void setDisplacement(Displacement *d)
A PointPlacement specifies how a text label should be rendered relative to a geometric point...
~PointPlacement()
Destructor.
void setRotation(ParameterValue *r)
A Displacement gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer near a point.
Definition: Displacement.h:58
The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
void setAnchorPoint(AnchorPoint *a)
PointPlacement * clone() const
It creates a new copy of this object.
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
A PointPlacement specifies how a text label should be rendered relative to a geometric point...
A Displacement gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer near a point.
An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it r...
PointPlacement()
It initializes a new PointPlacement.