|
Quantum GIS API Documentation
master-ce49b66
|
Interface for all raster shaders. More...
#include <qgsrastershader.h>
Collaboration diagram for QgsRasterShader:Public Member Functions | |
| QgsRasterShader (double theMinimumValue=0.0, double theMaximumValue=255.0) | |
| ~QgsRasterShader () | |
| double | maximumValue () |
| Return the maximum value for the raster shader. | |
| double | minimumValue () |
| Return the minimum value for the raster shader. | |
| QgsRasterShaderFunction * | rasterShaderFunction () |
| const QgsRasterShaderFunction * | rasterShaderFunction () const |
| void | readXML (const QDomElement &elem) |
| void | setMaximumValue (double) |
| Set the maximum value. | |
| void | setMinimumValue (double) |
| Return the minimum value. | |
| void | setRasterShaderFunction (QgsRasterShaderFunction *) |
| A public method that allows the user to set their own shader function. | |
| bool | shade (double, int *, int *, int *) |
| generates and new RGB value based on one input value | |
| bool | shade (double, double, double, int *, int *, int *) |
| generates and new RGB value based on original RGB value | |
| void | writeXML (QDomDocument &doc, QDomElement &parent) const |
Private Attributes | |
| double | mMaximumValue |
| user defineable maximum value for the raster shader | |
| double | mMinimumValue |
| User defineable minimum value for the raster shader. | |
| QgsRasterShaderFunction * | mRasterShaderFunction |
| Pointer to the shader function. | |
Interface for all raster shaders.
Definition at line 31 of file qgsrastershader.h.
| QgsRasterShader::QgsRasterShader | ( | double | theMinimumValue = 0.0, |
| double | theMaximumValue = 255.0 |
||
| ) |
Definition at line 25 of file qgsrastershader.cpp.
References mMaximumValue, mMinimumValue, mRasterShaderFunction, and QgsDebugMsg.
Definition at line 34 of file qgsrastershader.cpp.
References mRasterShaderFunction.
| double QgsRasterShader::maximumValue | ( | ) | [inline] |
Return the maximum value for the raster shader.
Definition at line 44 of file qgsrastershader.h.
Referenced by QgsSingleBandPseudoColorRenderer::clone().
| double QgsRasterShader::minimumValue | ( | ) | [inline] |
Return the minimum value for the raster shader.
Definition at line 47 of file qgsrastershader.h.
Referenced by QgsSingleBandPseudoColorRenderer::clone().
| QgsRasterShaderFunction* QgsRasterShader::rasterShaderFunction | ( | ) | [inline] |
Definition at line 49 of file qgsrastershader.h.
Referenced by QgsSingleBandPseudoColorRenderer::clone(), QgsSingleBandPseudoColorRenderer::legendSymbologyItems(), and QgsSingleBandPseudoColorRendererWidget::setFromRenderer().
| const QgsRasterShaderFunction* QgsRasterShader::rasterShaderFunction | ( | ) | const [inline] |
Definition at line 50 of file qgsrastershader.h.
| void QgsRasterShader::readXML | ( | const QDomElement & | elem | ) |
Definition at line 160 of file qgsrastershader.cpp.
References QgsColorRampShader::setClip(), QgsColorRampShader::setColorRampItemList(), QgsColorRampShader::setColorRampType(), and setRasterShaderFunction().
Referenced by QgsSingleBandPseudoColorRenderer::create().
| void QgsRasterShader::setMaximumValue | ( | double | theValue | ) |
Set the maximum value.
Set the maximum value for the raster shader.
| theValue | The new maximum value |
Definition at line 103 of file qgsrastershader.cpp.
References mMaximumValue, mRasterShaderFunction, QgsDebugMsg, and QgsRasterShaderFunction::setMaximumValue().
| void QgsRasterShader::setMinimumValue | ( | double | theValue | ) |
Return the minimum value.
Set the maximum value for the raster shader.
| theValue | The new minimum value |
Definition at line 119 of file qgsrastershader.cpp.
References mMinimumValue, mRasterShaderFunction, QgsDebugMsg, and QgsRasterShaderFunction::setMinimumValue().
| void QgsRasterShader::setRasterShaderFunction | ( | QgsRasterShaderFunction * | theFunction | ) |
A public method that allows the user to set their own shader function.
A public function that allows the user to set their own custom shader function.
| theFunction | A pointer to the new raster shader function |
Definition at line 84 of file qgsrastershader.cpp.
References mRasterShaderFunction, and QgsDebugMsg.
Referenced by QgsSingleBandPseudoColorRenderer::clone(), readXML(), QgsSingleBandPseudoColorRendererWidget::renderer(), and QgsRasterLayer::setDataProvider().
| bool QgsRasterShader::shade | ( | double | theValue, |
| int * | theReturnRedValue, | ||
| int * | theReturnGreenValue, | ||
| int * | theReturnBlueValue | ||
| ) |
generates and new RGB value based on one input value
Generates and new RGB value based on one input value.
| theValue | The original value to base a new RGB value on |
| theReturnRedValue | The red component of the new RGB value |
| theReturnGreenValue | The green component of the new RGB value |
| theReturnBlueValue | The blue component of the new RGB value |
Definition at line 48 of file qgsrastershader.cpp.
References mRasterShaderFunction, and QgsRasterShaderFunction::shade().
Referenced by QgsSingleBandPseudoColorRenderer::block().
| bool QgsRasterShader::shade | ( | double | theRedValue, |
| double | theGreenValue, | ||
| double | theBlueValue, | ||
| int * | theReturnRedValue, | ||
| int * | theReturnGreenValue, | ||
| int * | theReturnBlueValue | ||
| ) |
generates and new RGB value based on original RGB value
Generates and new RGB value based on an original RGB value.
| theRedValue | The red component of the original value to base a new RGB value on |
| theGreenValue | The green component of the original value to base a new RGB value on |
| theBlueValue | The blue component of the original value to base a new RGB value on |
| theReturnRedValue | The red component of the new RGB value |
| theReturnGreenValue | The green component of the new RGB value |
| theReturnBlueValue | The blue component of the new RGB value |
Definition at line 69 of file qgsrastershader.cpp.
References mRasterShaderFunction, and QgsRasterShaderFunction::shade().
| void QgsRasterShader::writeXML | ( | QDomDocument & | doc, |
| QDomElement & | parent | ||
| ) | const |
Definition at line 130 of file qgsrastershader.cpp.
References QgsColorRampShader::clip(), QgsColorRampShader::colorRampItemList(), QgsColorRampShader::colorRampTypeAsQString(), and mRasterShaderFunction.
Referenced by QgsSingleBandPseudoColorRenderer::writeXML().
double QgsRasterShader::mMaximumValue [private] |
user defineable maximum value for the raster shader
Definition at line 82 of file qgsrastershader.h.
Referenced by QgsRasterShader(), and setMaximumValue().
double QgsRasterShader::mMinimumValue [private] |
User defineable minimum value for the raster shader.
Definition at line 79 of file qgsrastershader.h.
Referenced by QgsRasterShader(), and setMinimumValue().
Pointer to the shader function.
Definition at line 85 of file qgsrastershader.h.
Referenced by QgsRasterShader(), setMaximumValue(), setMinimumValue(), setRasterShaderFunction(), shade(), writeXML(), and ~QgsRasterShader().