QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrastershaderfunction.cpp
Go to the documentation of this file.
1 /* **************************************************************************
2  qgsrastershaderfunction.cpp - 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 #include "qgslogger.h"
19 
21 
22 QgsRasterShaderFunction::QgsRasterShaderFunction( double theMinimumValue, double theMaximumValue )
23 {
24  QgsDebugMsg( "entered." );
25 
26  mMinimumValue = theMinimumValue;
27  mMaximumValue = theMaximumValue;
29 }
30 
37 {
38  QgsDebugMsg( "value = " + QString::number( theValue ) );
39 
40  mMaximumValue = theValue;
42 }
43 
50 {
51  QgsDebugMsg( "value = " + QString::number( theValue ) );
52 
53  mMinimumValue = theValue;
55 }
56 
67 bool QgsRasterShaderFunction::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int* theReturnAlphaValue )
68 {
69  Q_UNUSED( theValue );
70 
71  *theReturnRedValue = 0;
72  *theReturnGreenValue = 0;
73  *theReturnBlueValue = 0;
74  *theReturnAlphaValue = 0;
75 
76  return false;
77 }
78 
93 bool QgsRasterShaderFunction::shade( double theRedValue, double theGreenValue, double theBlueValue, double theAlphaValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue , int *theReturnAlphaValue )
94 {
95  Q_UNUSED( theRedValue );
96  Q_UNUSED( theGreenValue );
97  Q_UNUSED( theBlueValue );
98  Q_UNUSED( theAlphaValue );
99 
100  *theReturnRedValue = 0;
101  *theReturnGreenValue = 0;
102  *theReturnBlueValue = 0;
103  *theReturnAlphaValue = 0;
104 
105  return false;
106 }