Quantum GIS API Documentation
1.7.4
|
00001 /* ************************************************************************** 00002 qgsrastershaderfunction.cpp - description 00003 ------------------- 00004 begin : Fri Dec 28 2007 00005 copyright : (C) 2007 by Peter J. Ersts 00006 email : ersts@amnh.org 00007 00008 ****************************************************************************/ 00009 00010 /* ************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 #include "qgslogger.h" 00019 00020 #include "qgsrastershaderfunction.h" 00021 00022 QgsRasterShaderFunction::QgsRasterShaderFunction( double theMinimumValue, double theMaximumValue ) 00023 { 00024 QgsDebugMsg( "entered." ); 00025 00026 mMinimumValue = theMinimumValue; 00027 mMaximumValue = theMaximumValue; 00028 mMinimumMaximumRange = mMaximumValue - mMinimumValue; 00029 } 00030 00036 void QgsRasterShaderFunction::setMaximumValue( double theValue ) 00037 { 00038 QgsDebugMsg( "value = " + QString::number( theValue ) ); 00039 00040 mMaximumValue = theValue; 00041 mMinimumMaximumRange = mMaximumValue - mMinimumValue; 00042 } 00043 00049 void QgsRasterShaderFunction::setMinimumValue( double theValue ) 00050 { 00051 QgsDebugMsg( "value = " + QString::number( theValue ) ); 00052 00053 mMinimumValue = theValue; 00054 mMinimumMaximumRange = mMaximumValue - mMinimumValue; 00055 } 00056 00066 bool QgsRasterShaderFunction::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue ) 00067 { 00068 *theReturnRedValue = 0; 00069 *theReturnGreenValue = 0; 00070 *theReturnBlueValue = 0; 00071 00072 return false; 00073 } 00074 00087 bool QgsRasterShaderFunction::shade( double theRedValue, double theGreenValue, double theBlueValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue ) 00088 { 00089 *theReturnRedValue = 0; 00090 *theReturnGreenValue = 0; 00091 *theReturnBlueValue = 0; 00092 00093 return false; 00094 }