QGIS API Documentation  master-3f58142
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 
00067 bool QgsRasterShaderFunction::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int* theReturnAlphaValue )
00068 {
00069   Q_UNUSED( theValue );
00070 
00071   *theReturnRedValue = 0;
00072   *theReturnGreenValue = 0;
00073   *theReturnBlueValue = 0;
00074   *theReturnAlphaValue = 0;
00075 
00076   return false;
00077 }
00078 
00093 bool QgsRasterShaderFunction::shade( double theRedValue, double theGreenValue, double theBlueValue, double theAlphaValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue , int *theReturnAlphaValue )
00094 {
00095   Q_UNUSED( theRedValue );
00096   Q_UNUSED( theGreenValue );
00097   Q_UNUSED( theBlueValue );
00098   Q_UNUSED( theAlphaValue );
00099 
00100   *theReturnRedValue = 0;
00101   *theReturnGreenValue = 0;
00102   *theReturnBlueValue = 0;
00103   *theReturnAlphaValue = 0;
00104 
00105   return false;
00106 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines