QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
27 #include <QColor>
28 #include <QPair>
29 
30 class CORE_EXPORT QgsRasterShaderFunction
31 {
32 
33  public:
34  QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
36 
38  virtual void setMaximumValue( double );
39 
41  virtual void setMinimumValue( double );
42 
44  virtual bool shade( double, int*, int*, int*, int* );
45 
47  virtual bool shade( double, double, double, double, int*, int*, int*, int* );
48 
49  double minimumMaximumRange() const { return mMinimumMaximumRange; }
50 
51  double minimumValue() const { return mMinimumValue; }
52  double maximumValue() const { return mMaximumValue; }
53 
54  virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
55 
56  protected:
58  double mMaximumValue;
59 
61  double mMinimumValue;
62 
65 };
66 #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.