QGIS API Documentation  master-59fd5e0
src/core/raster/qgsrastershader.h
Go to the documentation of this file.
00001 /* **************************************************************************
00002                 qgsrastershader.h -  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 
00019 
00020 #ifndef QGSRASTERSHADER_H
00021 #define QGSRASTERSHADER_H
00022 
00023 #include "qgsrastershaderfunction.h"
00024 
00025 class QDomDocument;
00026 class QDomElement;
00027 
00031 class CORE_EXPORT QgsRasterShader
00032 {
00033 
00034   public:
00035     QgsRasterShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
00036     ~QgsRasterShader();
00037 
00038     /*
00039      *
00040      * Non-Static Inline methods
00041      *
00042      */
00044     double maximumValue() { return mMaximumValue; }
00045 
00047     double minimumValue() { return mMinimumValue; }
00048 
00049     QgsRasterShaderFunction* rasterShaderFunction() { return mRasterShaderFunction; }
00050     const QgsRasterShaderFunction* rasterShaderFunction() const { return mRasterShaderFunction; }
00051 
00052     /*
00053      *
00054      * Non-Static methods
00055      *
00056      */
00058     bool shade( double, int*, int*, int* , int* );
00059 
00061     bool shade( double, double, double, double, int*, int*, int* , int* );
00062 
00065     void setRasterShaderFunction( QgsRasterShaderFunction* );
00066 
00068     void setMaximumValue( double );
00069 
00071     void setMinimumValue( double );
00072 
00073     void writeXML( QDomDocument& doc, QDomElement& parent ) const;
00074 
00075     void readXML( const QDomElement& elem );
00076 
00077   private:
00079     double mMinimumValue;
00080 
00082     double mMaximumValue;
00083 
00085     QgsRasterShaderFunction* mRasterShaderFunction;
00086 };
00087 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines