QGIS API Documentation  2.99.0-Master (90ae728)
qgsrastershaderfunction.h
Go to the documentation of this file.
1 /* **************************************************************************
2  qgsrastershaderfunction.h - description
3  -------------------
4 begin : Fri Dec 28 2007
5 copyright : (C) 2007 by Peter J. Ersts
6 email : [email protected]
7 
8 ****************************************************************************/
9 
10 /* **************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 
20 #ifndef QGSRASTERSHADERFUNCTION_H
21 #define QGSRASTERSHADERFUNCTION_H
22 
28 #include "qgis_core.h"
29 #include <QColor>
30 #include <QPair>
31 
32 class CORE_EXPORT QgsRasterShaderFunction
33 {
34 
35  public:
36  QgsRasterShaderFunction( double minimumValue = 0.0, double maximumValue = 255.0 );
37  virtual ~QgsRasterShaderFunction() = default;
38 
40  virtual void setMaximumValue( double );
41 
43  virtual void setMinimumValue( double );
44 
46  virtual bool shade( double, int*, int*, int*, int* );
47 
49  virtual bool shade( double, double, double, double, int*, int*, int*, int* );
50 
51  double minimumMaximumRange() const { return mMinimumMaximumRange; }
52 
53  double minimumValue() const { return mMinimumValue; }
54  double maximumValue() const { return mMaximumValue; }
55 
56  virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
57 
58  protected:
60  double mMaximumValue;
61 
63  double mMinimumValue;
64 
67 };
68 #endif
double mMinimumValue
User defineable minimum value for the shading function.
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
double mMaximumValue
User defineable maximum value for the shading function.
The raster shade function applies a shader to a pixel at render time - typically used to render grays...
double mMinimumMaximumRange
Minimum maximum range for the shading function.