AbstractExternalGraphicRenderer.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/AbstractExternalGraphicRenderer.h
22 
23  \brief An abstract class for conversion of Symbology Enconding ExternalGraphic elements to an image pattern.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTEXTERNALGRAPHICRENDERER_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTEXTERNALGRAPHICRENDERER_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 ExternalGraphic;
39  }
40 
41  namespace map
42  {
43  /*!
44  \class AbstractExternalGraphicRenderer
45 
46  \brief An abstract class for conversion of Symbology Enconding ExternalGraphic elements to an image pattern.
47  */
49  {
50  public:
51 
52  /*! \brief Constructor. */
54 
55  /*! \brief Virtual destructor. */
57 
58  /*!
59  \brief It generates the image pattern from the given Symbology Enconding External Graphic element.
60 
61  \param eg The Symbology Enconding External Graphic element that will be used to build the image pattern.
62  \param height The height of image pattern that will be generated.
63  \param width An output parameter that will be filled with the width of generated image pattern.
64 
65  \return The RGBA image that represents the external graphic.
66 
67  \note If the given Symbology Enconding External Graphic element cannot be processed by the renderer the method should return a NULL pointer.
68 
69  \note The caller will take the ownership of the returned pointer.
70  */
71  virtual te::color::RGBAColor** render(const te::se::ExternalGraphic* eg, std::size_t height, std::size_t& width) = 0;
72  };
73 
74  } // end namespace map
75 } // end namespace te
76 
77 #endif // __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTEXTERNALGRAPHICRENDERER_H
virtual ~AbstractExternalGraphicRenderer()
Virtual destructor.
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in...
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 ExternalGraphic elements to an image pattern...