AbstractChartRenderer.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/AbstractChartRenderer.h
22 
23  \brief This is the base class for chart renderers.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTCHARTRENDERER_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTCHARTRENDERER_H
28 
29 // TerraLib
30 #include "../color/RGBAColor.h"
31 #include "Config.h"
32 
33 namespace te
34 {
35 // Forward declaration
36  namespace da
37  {
38  class DataSet;
39  }
40 
41  namespace map
42  {
43 // Forward declaration
44  class Chart;
45 
46  /*!
47  \class AbstractChartRenderer
48 
49  \brief This is the base class for chart renderers.
50  */
52  {
53  public:
54 
55  /*! \brief Constructor. */
57 
58  /*! \brief Virtual destructor. */
59  virtual ~AbstractChartRenderer() { }
60 
61  /*!
62  \brief It generates the image pattern from the given chart and the current element of dataset.
63 
64  \param chart The chart informations that will be used.
65  \param dataset The dataset that will be used.
66  \param width An output parameter that will be filled with the width of generated image pattern.
67 
68  \return The RGBA image that represents the chart.
69 
70  \note The caller will take the ownership of the returned pointer.
71  */
72  virtual te::color::RGBAColor** render(const Chart* chart, const te::da::DataSet* dataset, std::size_t& width) = 0;
73 
74  virtual te::color::RGBAColor** render(const Chart* chart, const std::map<std::string, double>& chartValue, std::size_t& width) = 0;
75  };
76 
77  } // end namespace map
78 } // end namespace te
79 
80 #endif // __TERRALIB_MAPTOOLS_INTERNAL_ABSTRACTCHARTRENDERER_H
This is the base class for chart renderers.
A wdiget used to customize a chart's style parameters.
This class represents the informations needed to build map charts.
Definition: Chart.h:51
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
virtual ~AbstractChartRenderer()
Virtual destructor.
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57