QGIS API Documentation
2.14.0-Essen
|
A ramp shader will color a raster pixel based on a list of values ranges in a ramp. More...
#include <qgscolorrampshader.h>
Classes | |
struct | ColorRampItem |
Public Types | |
enum | ColorRamp_TYPE { INTERPOLATED, DISCRETE, EXACT } |
Public Member Functions | |
QgsColorRampShader (double theMinimumValue=0.0, double theMaximumValue=255.0) | |
bool | clip () const |
QList< QgsColorRampShader::ColorRampItem > | colorRampItemList () const |
Get the custom colormap. More... | |
QgsColorRampShader::ColorRamp_TYPE | colorRampType () const |
Get the color ramp type. More... | |
QString | colorRampTypeAsQString () |
Get the color ramp type as a string. More... | |
void | legendSymbologyItems (QList< QPair< QString, QColor > > &symbolItems) const override |
int | maximumColorCacheSize () |
Get the maximum size the color cache can be. More... | |
void | setClip (bool clip) |
void | setColorRampItemList (const QList< QgsColorRampShader::ColorRampItem > &theList) |
Set custom colormap. More... | |
void | setColorRampType (QgsColorRampShader::ColorRamp_TYPE theColorRampType) |
Set the color ramp type. More... | |
void | setColorRampType (const QString &theType) |
Set the color ramp type. More... | |
void | setMaximumColorCacheSize (int theSize) |
Set the maximum size the color cache can be. More... | |
bool | shade (double, int *, int *, int *, int *) override |
Generates and new RGB value based on one input value. More... | |
bool | shade (double, double, double, double, int *, int *, int *, int *) override |
Generates and new RGB value based on original RGB value. More... | |
Public Member Functions inherited from QgsRasterShaderFunction | |
QgsRasterShaderFunction (double theMinimumValue=0.0, double theMaximumValue=255.0) | |
virtual | ~QgsRasterShaderFunction () |
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... | |
Additional Inherited Members | |
Protected Attributes inherited from QgsRasterShaderFunction | |
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... | |
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Definition at line 32 of file qgscolorrampshader.h.
Enumerator | |
---|---|
INTERPOLATED | |
DISCRETE | |
EXACT |
Definition at line 57 of file qgscolorrampshader.h.
QgsColorRampShader::QgsColorRampShader | ( | double | theMinimumValue = 0.0 , |
double | theMaximumValue = 255.0 |
||
) |
Definition at line 28 of file qgscolorrampshader.cpp.
|
inline |
Definition at line 97 of file qgscolorrampshader.h.
|
inline |
Get the custom colormap.
Definition at line 65 of file qgscolorrampshader.h.
|
inline |
Get the color ramp type.
Definition at line 68 of file qgscolorrampshader.h.
QString QgsColorRampShader::colorRampTypeAsQString | ( | ) |
Get the color ramp type as a string.
Definition at line 38 of file qgscolorrampshader.cpp.
|
overridevirtual |
Reimplemented from QgsRasterShaderFunction.
Definition at line 308 of file qgscolorrampshader.cpp.
|
inline |
Get the maximum size the color cache can be.
Definition at line 74 of file qgscolorrampshader.h.
|
inline |
Definition at line 96 of file qgscolorrampshader.h.
void QgsColorRampShader::setColorRampItemList | ( | const QList< QgsColorRampShader::ColorRampItem > & | theList | ) |
Set custom colormap.
Definition at line 220 of file qgscolorrampshader.cpp.
void QgsColorRampShader::setColorRampType | ( | QgsColorRampShader::ColorRamp_TYPE | theColorRampType | ) |
Set the color ramp type.
Definition at line 227 of file qgscolorrampshader.cpp.
void QgsColorRampShader::setColorRampType | ( | const QString & | theType | ) |
Set the color ramp type.
Definition at line 234 of file qgscolorrampshader.cpp.
|
inline |
Set the maximum size the color cache can be.
Definition at line 86 of file qgscolorrampshader.h.
|
overridevirtual |
Generates and new RGB value based on one input value.
Reimplemented from QgsRasterShaderFunction.
Definition at line 252 of file qgscolorrampshader.cpp.
|
overridevirtual |
Generates and new RGB value based on original RGB value.
Reimplemented from QgsRasterShaderFunction.
Definition at line 290 of file qgscolorrampshader.cpp.