Quantum GIS API Documentation  1.8
src/core/raster/qgsrastershaderfunction.cpp
Go to the documentation of this file.
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   Q_UNUSED( theValue );
00069 
00070   *theReturnRedValue = 0;
00071   *theReturnGreenValue = 0;
00072   *theReturnBlueValue = 0;
00073 
00074   return false;
00075 }
00076 
00089 bool QgsRasterShaderFunction::shade( double theRedValue, double theGreenValue, double theBlueValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue )
00090 {
00091   Q_UNUSED( theRedValue );
00092   Q_UNUSED( theGreenValue );
00093   Q_UNUSED( theBlueValue );
00094 
00095   *theReturnRedValue = 0;
00096   *theReturnGreenValue = 0;
00097   *theReturnBlueValue = 0;
00098 
00099   return false;
00100 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines