QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Interface for all raster shaders. More...
#include <qgsrastershader.h>
Public Member Functions | |
QgsRasterShader (const QgsRasterShader &rh)=delete | |
QgsRasterShader (double minimumValue=0.0, double maximumValue=255.0) | |
double | maximumValue () const |
Returns the maximum value for the raster shader. | |
double | minimumValue () const |
Returns the minimum value for the raster shader. | |
QgsRasterShader & | operator= (const QgsRasterShader &rh)=delete |
QgsRasterShaderFunction * | rasterShaderFunction () |
const QgsRasterShaderFunction * | rasterShaderFunction () const |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) |
Reads shader state from an XML element. | |
void | setMaximumValue (double value) |
Sets the maximum value for the raster shader. | |
void | setMinimumValue (double value) |
Sets the minimum value for the raster shader. | |
void | setRasterShaderFunction (QgsRasterShaderFunction *function) |
A public method that allows the user to set their own shader function. | |
bool | shade (double redValue, double greenValue, double blueValue, double alphaValue, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) const |
Generates a new RGBA value based on an original RGBA value. | |
bool | shade (double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) const |
Generates a new RGBA value based on one input value. | |
void | writeXml (QDomDocument &doc, QDomElement &parent, const QgsReadWriteContext &context=QgsReadWriteContext()) const |
Writes shader state to an XML element. | |
Interface for all raster shaders.
Definition at line 35 of file qgsrastershader.h.
QgsRasterShader::QgsRasterShader | ( | double | minimumValue = 0.0 , |
double | maximumValue = 255.0 |
||
) |
Definition at line 28 of file qgsrastershader.cpp.
|
delete |
|
inline |
Returns the maximum value for the raster shader.
Definition at line 55 of file qgsrastershader.h.
|
inline |
Returns the minimum value for the raster shader.
Definition at line 62 of file qgsrastershader.h.
|
delete |
|
inline |
Definition at line 64 of file qgsrastershader.h.
|
inline |
Definition at line 65 of file qgsrastershader.h.
void QgsRasterShader::readXml | ( | const QDomElement & | elem, |
const QgsReadWriteContext & | context = QgsReadWriteContext() |
||
) |
Reads shader state from an XML element.
Definition at line 107 of file qgsrastershader.cpp.
void QgsRasterShader::setMaximumValue | ( | double | value | ) |
Sets the maximum value for the raster shader.
Definition at line 69 of file qgsrastershader.cpp.
void QgsRasterShader::setMinimumValue | ( | double | value | ) |
Sets the minimum value for the raster shader.
Definition at line 80 of file qgsrastershader.cpp.
void QgsRasterShader::setRasterShaderFunction | ( | QgsRasterShaderFunction * | function | ) |
A public method that allows the user to set their own shader function.
Definition at line 56 of file qgsrastershader.cpp.
bool QgsRasterShader::shade | ( | double | redValue, |
double | greenValue, | ||
double | blueValue, | ||
double | alphaValue, | ||
int * | returnRedValue, | ||
int * | returnGreenValue, | ||
int * | returnBlueValue, | ||
int * | returnAlpha | ||
) | const |
Generates a new RGBA value based on an original RGBA value.
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 |
true
if the return values are valid otherwise false
Definition at line 46 of file qgsrastershader.cpp.
bool QgsRasterShader::shade | ( | double | value, |
int * | returnRedValue, | ||
int * | returnGreenValue, | ||
int * | returnBlueValue, | ||
int * | returnAlpha | ||
) | const |
Generates a new RGBA value based on one input value.
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 |
true
if the return values are valid otherwise false
Definition at line 36 of file qgsrastershader.cpp.
void QgsRasterShader::writeXml | ( | QDomDocument & | doc, |
QDomElement & | parent, | ||
const QgsReadWriteContext & | context = QgsReadWriteContext() |
||
) | const |
Writes shader state to an XML element.
Definition at line 91 of file qgsrastershader.cpp.