QGIS API Documentation  3.0.2-Girona (307d082)
Public Member Functions | Protected Attributes | List of all members
QgsRasterShaderFunction Class Reference

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>

Inheritance diagram for QgsRasterShaderFunction:
Inheritance graph
[legend]

Public Member Functions

 QgsRasterShaderFunction (double minimumValue=0.0, double maximumValue=255.0)
 
virtual ~QgsRasterShaderFunction ()=default
 
virtual void legendSymbologyItems (QList< QPair< QString, QColor > > &symbolItems) const
 
double maximumValue () const
 
double minimumMaximumRange () const
 
double minimumValue () const
 
virtual void setMaximumValue (double)
 Set the maximum value. More...
 
virtual void setMinimumValue (double)
 Return the minimum value. More...
 
virtual bool shade (double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha)
 generates and new RGBA value based on one input value More...
 
virtual bool shade (double redValue, double greenValue, double blueValue, double alphaValue, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha)
 generates and new RGBA value based on original RGBA value More...
 

Protected Attributes

double mMaximumValue
 User defineable maximum value for the shading function. More...
 
double mMinimumMaximumRange
 Minimum maximum range for the shading function. More...
 
double mMinimumValue
 User defineable minimum value for the shading function. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsRasterShaderFunction()

QgsRasterShaderFunction::QgsRasterShaderFunction ( double  minimumValue = 0.0,
double  maximumValue = 255.0 
)

Definition at line 22 of file qgsrastershaderfunction.cpp.

◆ ~QgsRasterShaderFunction()

virtual QgsRasterShaderFunction::~QgsRasterShaderFunction ( )
virtualdefault

Member Function Documentation

◆ legendSymbologyItems()

virtual void QgsRasterShaderFunction::legendSymbologyItems ( QList< QPair< QString, QColor > > &  symbolItems) const
inlinevirtual

Reimplemented in QgsColorRampShader.

Definition at line 82 of file qgsrastershaderfunction.h.

◆ maximumValue()

double QgsRasterShaderFunction::maximumValue ( ) const
inline

Definition at line 80 of file qgsrastershaderfunction.h.

◆ minimumMaximumRange()

double QgsRasterShaderFunction::minimumMaximumRange ( ) const
inline

Definition at line 77 of file qgsrastershaderfunction.h.

◆ minimumValue()

double QgsRasterShaderFunction::minimumValue ( ) const
inline

Definition at line 79 of file qgsrastershaderfunction.h.

◆ setMaximumValue()

void QgsRasterShaderFunction::setMaximumValue ( double  value)
virtual

Set the maximum value.

Set the maximum value for the raster shader.

Parameters
valueThe new maximum value

Definition at line 35 of file qgsrastershaderfunction.cpp.

◆ setMinimumValue()

void QgsRasterShaderFunction::setMinimumValue ( double  value)
virtual

Return the minimum value.

Set the maximum value for the raster shader.

Parameters
valueThe new minimum value

Definition at line 48 of file qgsrastershaderfunction.cpp.

◆ shade() [1/2]

bool QgsRasterShaderFunction::shade ( double  value,
int *  returnRedValue,
int *  returnGreenValue,
int *  returnBlueValue,
int *  returnAlphaValue 
)
virtual

generates and new RGBA value based on one input value

Generates and new RGBA value based on one input value.

Parameters
valueThe original value to base a new RGBA value on
returnRedValueThe red component of the new RGBA value
returnGreenValueThe green component of the new RGBA value
returnBlueValueThe blue component of the new RGBA value
returnAlphaValueThe blue component of the new RGBA value
Returns
True if the return values are valid otherwise false

Reimplemented in QgsColorRampShader.

Definition at line 66 of file qgsrastershaderfunction.cpp.

◆ shade() [2/2]

bool QgsRasterShaderFunction::shade ( double  redValue,
double  greenValue,
double  blueValue,
double  alphaValue,
int *  returnRedValue,
int *  returnGreenValue,
int *  returnBlueValue,
int *  returnAlphaValue 
)
virtual

generates and new RGBA value based on original RGBA value

Generates and new RGBA value based on an original RGBA value.

Parameters
redValueThe red component of the original value to base a new RGBA value on
greenValueThe green component of the original value to base a new RGBA value on
blueValueThe blue component of the original value to base a new RGBA value on
alphaValueThe alpha component of the original value to base a new RGBA value on
returnRedValueThe red component of the new RGBA value
returnGreenValueThe green component of the new RGBA value
returnBlueValueThe blue component of the new RGBA value
returnAlphaValueThe alpha component of the new RGBA value
Returns
True if the return values are valid otherwise false

Reimplemented in QgsColorRampShader.

Definition at line 92 of file qgsrastershaderfunction.cpp.

Member Data Documentation

◆ mMaximumValue

double QgsRasterShaderFunction::mMaximumValue
protected

User defineable maximum value for the shading function.

Definition at line 86 of file qgsrastershaderfunction.h.

◆ mMinimumMaximumRange

double QgsRasterShaderFunction::mMinimumMaximumRange
protected

Minimum maximum range for the shading function.

Definition at line 92 of file qgsrastershaderfunction.h.

◆ mMinimumValue

double QgsRasterShaderFunction::mMinimumValue
protected

User defineable minimum value for the shading function.

Definition at line 89 of file qgsrastershaderfunction.h.


The documentation for this class was generated from the following files: