21 #ifndef QGSCOLORRAMPSHADER_H
22 #define QGSCOLORRAMPSHADER_H
71 QString colorRampTypeAsQString();
83 void setColorRampType(
const QString& theType );
89 bool shade(
double,
int*,
int*,
int*,
int* )
override;
92 bool shade(
double,
double,
double,
double,
int*,
int*,
int*,
int* )
override;
96 void setClip(
bool clip ) { mClip = clip; }
97 bool clip()
const {
return mClip; }
101 int mCurrentColorRampItemIndex;
119 int mMaximumColorCacheSize;
124 bool discreteColor(
double,
int*,
int*,
int*,
int* );
129 bool exactColor(
double,
int*,
int*,
int*,
int* );
134 bool interpolatedColor(
double,
int*,
int*,
int*,
int* );
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
bool operator<(const ColorRampItem &other) const
virtual bool shade(double, int *, int *, int *, int *)
generates and new RGBA value based on one input value
QList< QgsColorRampShader::ColorRampItem > colorRampItemList() const
Get the custom colormap.
QgsColorRampShader::ColorRamp_TYPE colorRampType() const
Get the color ramp type.
ColorRampItem()
default constructor
The raster shade function applies a shader to a pixel at render time - typically used to render grays...
ColorRampItem(double val, const QColor &col, const QString &lbl=QString())
convenience constructor
void setMaximumColorCacheSize(int theSize)
Set the maximum size the color cache can be.
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
int maximumColorCacheSize()
Get the maximum size the color cache can be.