Interface for all raster shaders.
More...
#include <qgsrastershader.h>
|
| QgsRasterShader (const QgsRasterShader &rh)=delete |
| QgsRasterShader cannot be copied. More...
|
|
| QgsRasterShader (double minimumValue=0.0, double maximumValue=255.0) |
|
double | maximumValue () const |
| Returns the maximum value for the raster shader. More...
|
|
double | minimumValue () const |
| Returns the minimum value for the raster shader. More...
|
|
QgsRasterShader & | operator= (const QgsRasterShader &rh)=delete |
| QgsRasterShader cannot be copied. More...
|
|
QgsRasterShaderFunction * | rasterShaderFunction () |
|
const QgsRasterShaderFunction * | rasterShaderFunction () const |
|
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) |
| Reads shader state from an XML element. More...
|
|
void | setMaximumValue (double value) |
| Sets the maximum value for the raster shader. More...
|
|
void | setMinimumValue (double value) |
| Sets the minimum value for the raster shader. More...
|
|
void | setRasterShaderFunction (QgsRasterShaderFunction *function) |
| A public method that allows the user to set their own shader function. More...
|
|
bool | shade (double redValue, double greenValue, double blueValue, double alphaValue, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) |
| Generates a new RGBA value based on an original RGBA value. More...
|
|
bool | shade (double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) |
| Generates a new RGBA value based on one input value. More...
|
|
void | writeXml (QDomDocument &doc, QDomElement &parent, const QgsReadWriteContext &context=QgsReadWriteContext()) const |
| Writes shader state to an XML element. More...
|
|
Interface for all raster shaders.
Definition at line 35 of file qgsrastershader.h.
◆ QgsRasterShader() [1/2]
QgsRasterShader::QgsRasterShader |
( |
double |
minimumValue = 0.0 , |
|
|
double |
maximumValue = 255.0 |
|
) |
| |
◆ QgsRasterShader() [2/2]
◆ maximumValue()
double QgsRasterShader::maximumValue |
( |
| ) |
const |
|
inline |
◆ minimumValue()
double QgsRasterShader::minimumValue |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ rasterShaderFunction() [1/2]
◆ rasterShaderFunction() [2/2]
◆ readXml()
◆ setMaximumValue()
void QgsRasterShader::setMaximumValue |
( |
double |
value | ) |
|
◆ setMinimumValue()
void QgsRasterShader::setMinimumValue |
( |
double |
value | ) |
|
◆ setRasterShaderFunction()
A public method that allows the user to set their own shader function.
- Note
- Raster shader takes ownership of the shader function instance
Definition at line 56 of file qgsrastershader.cpp.
◆ shade() [1/2]
bool QgsRasterShader::shade |
( |
double |
redValue, |
|
|
double |
greenValue, |
|
|
double |
blueValue, |
|
|
double |
alphaValue, |
|
|
int * |
returnRedValue, |
|
|
int * |
returnGreenValue, |
|
|
int * |
returnBlueValue, |
|
|
int * |
returnAlpha |
|
) |
| |
Generates a new RGBA value based on an original RGBA value.
- Parameters
-
redValue | The red component of the original value to base a new RGBA value on |
greenValue | The green component of the original value to base a new RGBA value on |
blueValue | The blue component of the original value to base a new RGBA value on |
alphaValue | The alpha component of the original value to base a new RGBA value on |
returnRedValue | The red component of the new RGBA value |
returnGreenValue | The green component of the new RGBA value |
returnBlueValue | The blue component of the new RGBA value |
returnAlpha | The alpha component of the new RGBA value |
- Returns
true
if the return values are valid otherwise false
Definition at line 46 of file qgsrastershader.cpp.
◆ shade() [2/2]
bool QgsRasterShader::shade |
( |
double |
value, |
|
|
int * |
returnRedValue, |
|
|
int * |
returnGreenValue, |
|
|
int * |
returnBlueValue, |
|
|
int * |
returnAlpha |
|
) |
| |
Generates a new RGBA value based on one input value.
- Parameters
-
value | The original value to base a new RGBA value on |
returnRedValue | The red component of the new RGBA value |
returnGreenValue | The green component of the new RGBA value |
returnBlueValue | The blue component of the new RGBA value |
returnAlpha | The alpha component of the new RGBA value |
- Returns
true
if the return values are valid otherwise false
Definition at line 36 of file qgsrastershader.cpp.
◆ writeXml()
The documentation for this class was generated from the following files: