QGIS API Documentation  2.99.0-Master (e077efd)
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 <QColor>
29 #include <QPair>
30 
31 class CORE_EXPORT QgsRasterShaderFunction
32 {
33 
34  public:
35  QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
37 
39  virtual void setMaximumValue( double );
40 
42  virtual void setMinimumValue( double );
43 
45  virtual bool shade( double, int*, int*, int*, int* );
46 
48  virtual bool shade( double, double, double, double, int*, int*, int*, int* );
49 
50  double minimumMaximumRange() const { return mMinimumMaximumRange; }
51 
52  double minimumValue() const { return mMinimumValue; }
53  double maximumValue() const { return mMaximumValue; }
54 
55  virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
56 
57  protected:
59  double mMaximumValue;
60 
62  double mMinimumValue;
63 
66 };
67 #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.