QGIS API Documentation  2.99.0-Master (ba079d8)
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 "qgis_sip.h"
30 #include <QColor>
31 #include <QPair>
32 
33 class CORE_EXPORT QgsRasterShaderFunction
34 {
35 
36  public:
37  QgsRasterShaderFunction( double minimumValue = 0.0, double maximumValue = 255.0 );
38  virtual ~QgsRasterShaderFunction() = default;
39 
41  virtual void setMaximumValue( double );
42 
44  virtual void setMinimumValue( double );
45 
47  virtual bool shade( double, int *, int *, int *, int * );
48 
50  virtual bool shade( double, double, double, double, int *, int *, int *, int * );
51 
52  double minimumMaximumRange() const { return mMinimumMaximumRange; }
53 
54  double minimumValue() const { return mMinimumValue; }
55  double maximumValue() const { return mMaximumValue; }
56 
57  virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems SIP_OUT ) const { Q_UNUSED( symbolItems ); }
58 
59  protected:
61  double mMaximumValue;
62 
64  double mMinimumValue;
65 
68 };
69 #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...
#define SIP_OUT
Definition: qgis_sip.h:39
double mMinimumMaximumRange
Minimum maximum range for the shading function.