Interface for all raster shaders.
More...
#include <qgsrastershader.h>
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 |
bool | shade (double, int *, int *, int *, int *) |
| generates and new RGBA value based on one input value
|
bool | shade (double, double, double, double, int *, int *, int *, int *) |
| generates and new RGBA value based on original RGBA value
|
void | setRasterShaderFunction (QgsRasterShaderFunction *) |
| A public method that allows the user to set their own shader function.
|
void | setMaximumValue (double) |
| Set the maximum value.
|
void | setMinimumValue (double) |
| Return the minimum value.
|
void | writeXML (QDomDocument &doc, QDomElement &parent) const |
void | readXML (const QDomElement &elem) |
Detailed Description
Interface for all raster shaders.
Constructor & Destructor Documentation
QgsRasterShader::QgsRasterShader |
( |
double |
theMinimumValue = 0.0 , |
|
|
double |
theMaximumValue = 255.0 |
|
) |
| |
QgsRasterShader::~QgsRasterShader |
( |
| ) |
|
Member Function Documentation
double QgsRasterShader::maximumValue |
( |
| ) |
|
|
inline |
Return the maximum value for the raster shader.
double QgsRasterShader::minimumValue |
( |
| ) |
|
|
inline |
Return the minimum value for the raster shader.
void QgsRasterShader::readXML |
( |
const QDomElement & |
elem | ) |
|
void QgsRasterShader::setMaximumValue |
( |
double |
theValue | ) |
|
Set the maximum value.
Set the maximum value for the raster shader.
- Parameters
-
theValue | The new maximum value |
void QgsRasterShader::setMinimumValue |
( |
double |
theValue | ) |
|
Return the minimum value.
Set the maximum value for the raster shader.
- Parameters
-
theValue | The new minimum value |
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.
- Note
- Raster shader takes ownership of the shader function instance
- Parameters
-
theFunction | A pointer to the new raster shader function |
bool QgsRasterShader::shade |
( |
double |
theValue, |
|
|
int * |
theReturnRedValue, |
|
|
int * |
theReturnGreenValue, |
|
|
int * |
theReturnBlueValue, |
|
|
int * |
theReturnAlpha |
|
) |
| |
generates and new RGBA value based on one input value
Generates and new RGBA value based on one input value.
- Parameters
-
theValue | The original value to base a new RGBA value on |
theReturnRedValue | The red component of the new RGBA value |
theReturnGreenValue | The green component of the new RGBA value |
theReturnBlueValue | The blue component of the new RGBA value |
theReturnAlpha | The alpha component of the new RGBA value |
- Returns
- True if the return values are valid otherwise false
bool QgsRasterShader::shade |
( |
double |
theRedValue, |
|
|
double |
theGreenValue, |
|
|
double |
theBlueValue, |
|
|
double |
theAlphaValue, |
|
|
int * |
theReturnRedValue, |
|
|
int * |
theReturnGreenValue, |
|
|
int * |
theReturnBlueValue, |
|
|
int * |
theReturnAlphaValue |
|
) |
| |
generates and new RGBA value based on original RGBA value
Generates and new RGBA value based on an original RGBA value.
- Parameters
-
theRedValue | The red component of the original value to base a new RGBA value on |
theGreenValue | The green component of the original value to base a new RGBA value on |
theBlueValue | The blue component of the original value to base a new RGBA value on |
theAlphaValue | The alpha component of the original value to base a new RGBA value on |
theReturnRedValue | The red component of the new RGBA value |
theReturnGreenValue | The green component of the new RGBA value |
theReturnBlueValue | The blue component of the new RGBA value |
theReturnAlphaValue | The alpha component of the new RGBA value |
- Returns
- True if the return values are valid otherwise false
void QgsRasterShader::writeXML |
( |
QDomDocument & |
doc, |
|
|
QDomElement & |
parent |
|
) |
| const |
The documentation for this class was generated from the following files: