QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgspseudocolorshader.h
Go to the documentation of this file.
1 /* **************************************************************************
2  qgspseudocolorshader.h - description
3  -------------------
4 begin : Fri Dec 28 2007
5 copyright : (C) 2007 by Peter J. Ersts
6 email : [email protected]
7 
8 This class contains code that was originally part of the larger QgsRasterLayer
9 class originally created circa 2004 by T.Sutton, Gary E.Sherman, Steve Halasz
10 ****************************************************************************/
11 
12 /* **************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  ***************************************************************************/
20 
21 #ifndef QGSPSEUDOCOLORSHADER_H
22 #define QGSPSEUDOCOLORSHADER_H
23 
25 
30 {
31 
32  public:
33  QgsPseudoColorShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
34 
36  bool shade( double, int*, int*, int* );
37 
39  bool shade( double, double, double, int*, int*, int* );
40 
42  void setMaximumValue( double ) override;
43 
45  void setMinimumValue( double ) override;
46 
47  double classBreakMin1() const { return mClassBreakMin1; }
48  double classBreakMax1() const { return mClassBreakMax1; }
49  double classBreakMin2() const { return mClassBreakMin2; }
50  double classBreakMax2() const { return mClassBreakMax2; }
51  double classBreakMin3() const { return mClassBreakMin3; }
52 
53  private:
54  void setClassBreaks();
55 
56  double mBreakSize;
57  double mClassBreakMin1;
58  double mClassBreakMax1;
59  double mClassBreakMin2;
60  double mClassBreakMax2;
61  double mClassBreakMin3;
62 };
63 #endif
A raster color shader that highlighs low values in blue and high values in red.
double classBreakMin1() const
double classBreakMin3() const
virtual bool shade(double, int *, int *, int *, int *)
generates and new RGBA value based on one input value
double classBreakMax2() const
double classBreakMin2() const
The raster shade function applies a shader to a pixel at render time - typically used to render grays...
double classBreakMax1() const
virtual void setMinimumValue(double)
Return the minimum value.
virtual void setMaximumValue(double)
Set the maximum value.