Loading...
Searching...
No Matches
GraphicStroke.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/GraphicStroke.h
22
23 \brief A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line.
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_GRAPHICSTROKE_H
27#define __TERRALIB_SE_INTERNAL_GRAPHICSTROKE_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 Graphic;
41 class ParameterValue;
42
43 /*!
44 \class GraphicStroke
45
46 \brief A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line.
47
48 \sa Stroke, Graphic, ParameterValue
49 */
50 class TESEEXPORT GraphicStroke : public boost::noncopyable
51 {
52 public:
53
54 /** @name Initializer Methods
55 * Methods related to instantiation and destruction.
56 */
57 //@{
58
59 /*! \brief It initializes a new GraphicStroke. */
61
62 /*! \brief Destructor. */
64
65 //@}
66
67 /** @name Accessor methods
68 * Methods used to get or set properties.
69 */
70 //@{
71
72 /*!
73 \brief It specifies the linear graphic.
74
75 Proper stroking with a linear
76 graphic requires two "hot-spot" points within the space of the graphic to indicate where
77 the rendering line starts and stops. In the case of raster images with no special mark-up,
78 this line will be assumed to be middle pixel row of the image, starting from the first pixel
79 column and ending at the last pixel column.
80
81 \param g The linear graphic.
82
83 \note The GraphicStroke object will take the ownership of the informed Graphic pointer.
84 */
86
87 const Graphic* getGraphic() const;
88
90
91 /*!
92 \brief It specifies how far away the first graphic will be drawn relative to the start of the rendering line.
93
94 \param initialGap The initial gap.
95
96 \note The GraphicStroke object will take the ownership of the informed ParameterValue pointer.
97 */
98 void setInitialGap(ParameterValue* initialGap);
99
101
102 /*!
103 \brief It sets the distance between two graphics.
104
105 \param gap The initial gap.
106
107 \note The GraphicStroke object will take the ownership of the informed ParameterValue pointer.
108 */
110
111 const ParameterValue* getGap() const;
112
113 //@}
114
115 /*! \brief It creates a new copy of this object. */
117
118 private:
119
120 Graphic* m_graphic; //!< It specifies the linear graphic. (Mandatory)
121 ParameterValue* m_initialGap; //!< It defines the initial empty space, before the first Graphic or Label should be rendered. (Optional)
122 ParameterValue* m_gap; //!< It defines the empty space between two Graphics or Labels. (Optional)
123 };
124
125 } // end namespace se
126} // end namespace te
127
128#endif // __TERRALIB_SE_INTERNAL_GRAPHICSTROKE_H
A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line.
Definition: GraphicStroke.h:51
const ParameterValue * getInitialGap() const
void setGraphic(Graphic *g)
It specifies the linear graphic.
const Graphic * getGraphic() const
void setInitialGap(ParameterValue *initialGap)
It specifies how far away the first graphic will be drawn relative to the start of the rendering line...
GraphicStroke()
It initializes a new GraphicStroke.
GraphicStroke * clone() const
It creates a new copy of this object.
ParameterValue * m_initialGap
It defines the initial empty space, before the first Graphic or Label should be rendered....
const ParameterValue * getGap() const
ParameterValue * m_gap
It defines the empty space between two Graphics or Labels. (Optional)
~GraphicStroke()
Destructor.
void setGap(ParameterValue *gap)
It sets the distance between two graphics.
Graphic * m_graphic
It specifies the linear graphic. (Mandatory)
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
Definition: Graphic.h:67
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
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).