QgsRasterShaderFunction class
The raster shade function applies a shader to a pixel at render time - typically used to render grayscale images as false color.
Contents
Derived classes
- class QgsColorRampShader
- A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Public functions
- void legendSymbologyItems(QList<QPair<QString, QColor>>& symbolItems) const virtual
- Returns legend symbology items if provided by renderer.
- auto maximumValue() const -> double
- Returns the minimum value for the raster shader.
- auto minimumValue() const -> double
- Returns the maximum value for the raster shader.
- void setMaximumValue(double value) virtual
- Sets the maximum value for the raster shader.
- void setMinimumValue(double value) virtual
- Sets the minimum value for the raster shader.
- auto shade(double value, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int* returnAlpha) const -> bool virtual
- Generates an new RGBA value based on one input value.
- auto shade(double redValue, double greenValue, double blueValue, double alphaValue, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int* returnAlpha) const -> bool virtual
- Generates an new RGBA value based on an original RGBA value.
Protected variables
- 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.
Function documentation
double QgsRasterShaderFunction:: maximumValue() const
Returns the minimum value for the raster shader.
double QgsRasterShaderFunction:: minimumValue() const
Returns the maximum value for the raster shader.
void QgsRasterShaderFunction:: setMaximumValue(double value) virtual
Sets the maximum value for the raster shader.
void QgsRasterShaderFunction:: setMinimumValue(double value) virtual
Sets the minimum value for the raster shader.
bool QgsRasterShaderFunction:: shade(double value,
int* returnRedValue,
int* returnGreenValue,
int* returnBlueValue,
int* returnAlpha) const virtual
Generates an 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 |
bool QgsRasterShaderFunction:: shade(double redValue,
double greenValue,
double blueValue,
double alphaValue,
int* returnRedValue,
int* returnGreenValue,
int* returnBlueValue,
int* returnAlpha) const virtual
Generates an 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 |