All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LinePlacement.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/LinePlacement.cpp
22 
23  \brief A LinePlacement specifies how a text label should be rendered relative to a linear geometry.
24 */
25 
26 // TerraLib
27 #include "LinePlacement.h"
28 #include "ParameterValue.h"
29 
31  : m_perpendicularOffset(0),
32  m_isRepeated(false),
33  m_initialGap(0),
34  m_gap(0),
35  m_isAligned(true),
36  m_generalizeLine(false)
37 {
38 }
39 
41 {
42  delete m_perpendicularOffset;
43  delete m_initialGap;
44  delete m_gap;
45 }
46 
48 {
49  delete m_perpendicularOffset;
50  m_perpendicularOffset = p;
51 }
52 
54 {
55  m_isRepeated = i;
56 }
57 
59 {
60  delete m_initialGap;
61  m_initialGap = p;
62 }
63 
65 {
66  delete m_gap;
67  m_gap = p;
68 }
69 
71 {
72  m_isAligned = i;
73 }
74 
76 {
77  m_generalizeLine = g;
78 }
79 
81 {
82  LinePlacement* lp = new LinePlacement;
83 
84  lp->setIsRepeated(m_isRepeated);
85  lp->setIsAligned(m_isAligned);
86  lp->setGeneralizeLine(m_generalizeLine);
87 
88  if(m_perpendicularOffset)
89  lp->setPerpendicularOffset(m_perpendicularOffset->clone());
90 
91  if(m_gap)
92  lp->setGap(m_gap->clone());
93 
94  if(m_initialGap)
95  lp->setInitialGap(m_initialGap->clone());
96 
97  return lp;
98 }
void setIsAligned(bool i)
LinePlacement()
It initializes a new LinePlacement.
void setInitialGap(ParameterValue *p)
A LinePlacement specifies how a text label should be rendered relative to a linear geometry...
Definition: LinePlacement.h:61
The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
void setGap(ParameterValue *p)
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
A LinePlacement specifies how a text label should be rendered relative to a linear geometry...
~LinePlacement()
Destructor.
LinePlacement * clone() const
It creates a new copy of this object.
void setPerpendicularOffset(ParameterValue *p)
void setIsRepeated(bool i)
void setGeneralizeLine(bool g)