QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
The raster shade function applies a shader to a pixel at render time - typically used to render grayscale images as false color. More...
#include <qgsrastershaderfunction.h>
Public Member Functions | |
QgsRasterShaderFunction (double minimumValue=0.0, double maximumValue=255.0) | |
virtual | ~QgsRasterShaderFunction ()=default |
int | labelPrecision () const |
Returns label precision. | |
virtual void | legendSymbologyItems (QList< QPair< QString, QColor > > &symbolItems) const |
Returns legend symbology items if provided by renderer. | |
double | maximumValue () const |
Returns the minimum value for the raster shader. | |
double | minimumMaximumRange () const |
double | minimumValue () const |
Returns the maximum value for the raster shader. | |
void | setLabelPrecision (int labelPrecision) |
Sets label precision to labelPrecision. | |
virtual void | setMaximumValue (double value) |
Sets the maximum value for the raster shader. | |
virtual void | setMinimumValue (double value) |
Sets the minimum value for the raster shader. | |
virtual bool | shade (double redValue, double greenValue, double blueValue, double alphaValue, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) const |
Generates an new RGBA value based on an original RGBA value. | |
virtual bool | shade (double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha) const |
Generates an new RGBA value based on one input value. | |
Protected Attributes | |
int | mLabelPrecision = 6 |
Label precision. | |
double | mMaximumValue |
User defineable maximum value for the shading function. | |
double | mMinimumMaximumRange |
Minimum maximum range for the shading function. | |
double | mMinimumValue |
User defineable minimum value for the shading function. | |
The raster shade function applies a shader to a pixel at render time - typically used to render grayscale images as false color.
Definition at line 34 of file qgsrastershaderfunction.h.
QgsRasterShaderFunction::QgsRasterShaderFunction | ( | double | minimumValue = 0.0 , |
double | maximumValue = 255.0 |
||
) |
Definition at line 22 of file qgsrastershaderfunction.cpp.
|
virtualdefault |
int QgsRasterShaderFunction::labelPrecision | ( | ) | const |
|
inlinevirtual |
Returns legend symbology items if provided by renderer.
Reimplemented in QgsColorRampShader.
Definition at line 124 of file qgsrastershaderfunction.h.
|
inline |
Returns the minimum value for the raster shader.
Definition at line 119 of file qgsrastershaderfunction.h.
|
inline |
Definition at line 105 of file qgsrastershaderfunction.h.
|
inline |
Returns the maximum value for the raster shader.
Definition at line 112 of file qgsrastershaderfunction.h.
void QgsRasterShaderFunction::setLabelPrecision | ( | int | labelPrecision | ) |
Sets label precision to labelPrecision.
Definition at line 79 of file qgsrastershaderfunction.cpp.
|
virtual |
Sets the maximum value for the raster shader.
Definition at line 30 of file qgsrastershaderfunction.cpp.
|
virtual |
Sets the minimum value for the raster shader.
Definition at line 38 of file qgsrastershaderfunction.cpp.
|
virtual |
Generates an 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
Reimplemented in QgsColorRampShader.
Definition at line 58 of file qgsrastershaderfunction.cpp.
|
virtual |
Generates an 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
Reimplemented in QgsColorRampShader.
Definition at line 46 of file qgsrastershaderfunction.cpp.
|
protected |
Label precision.
Definition at line 149 of file qgsrastershaderfunction.h.
|
protected |
User defineable maximum value for the shading function.
Definition at line 140 of file qgsrastershaderfunction.h.
|
protected |
Minimum maximum range for the shading function.
Definition at line 146 of file qgsrastershaderfunction.h.
|
protected |
User defineable minimum value for the shading function.
Definition at line 143 of file qgsrastershaderfunction.h.