AbstractMarkRenderer.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/maptools/AbstractMarkRenderer.h
22 
23  \brief An abstract class for conversion of Symbology Enconding Mark elements to an image pattern.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTMARKRENDERER_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTMARKRENDERER_H
28 
29 // TerraLib
30 #include "../color/RGBAColor.h"
31 #include "Config.h"
32 
33 namespace te
34 {
35 // Forward declarations
36  namespace se
37  {
38  class Mark;
39  }
40 
41  namespace map
42  {
43  /*!
44  \class AbstractMarkRenderer
45 
46  \brief An abstract class for conversion of Symbology Enconding Mark elements to an image pattern.
47  */
49  {
50  public:
51 
52  /*! \brief Constructor. */
54 
55  /*! \brief Virtual destructor. */
56  virtual ~AbstractMarkRenderer() { }
57 
58  /*!
59  \brief It generates the image pattern from the given Symbology Enconding Mark element.
60 
61  \param mark The Symbology Enconding Mark element that will be used to build the image pattern.
62  \param size The size of image pattern that will be generated.
63 
64  \return The RGBA image that represents the mark.
65 
66  \note The caller will take the ownership of the returned pointer.
67  */
68  virtual te::color::RGBAColor** render(const te::se::Mark* mark, std::size_t size) = 0;
69 
70  /*!
71  \brief Method that informs the set of supported marks by a specific concrete mark renderer.
72 
73  \param marks A pre-created vector of string that will be filled with the supported marks names.
74  */
75  virtual void getSupportedMarks(std::vector<std::string>& marks) const = 0;
76  };
77 
78  } // end namespace map
79 } // end namespace te
80 
81 #endif // __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTMARKRENDERER_H
A Mark specifies a geometric shape and applies coloring to it.
Definition: Mark.h:84
virtual ~AbstractMarkRenderer()
Virtual destructor.
URI C++ Library.
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
An abstract class for conversion of Symbology Enconding Mark elements to an image pattern...