21 #ifndef QGSCOLORRAMPSHADER_H
22 #define QGSCOLORRAMPSHADER_H
47 ColorRampItem(
double val, QColor col, QString lbl = QString() ) : label( lbl ), value( val ), color( col ) {}
65 QList<QgsColorRampShader::ColorRampItem>
colorRampItemList()
const {
return mColorRampItemList;}
71 QString colorRampTypeAsQString();
77 void setColorRampItemList(
const QList<QgsColorRampShader::ColorRampItem>& theList );
83 void setColorRampType( QString );
89 bool shade(
double,
int*,
int*,
int*,
int* );
92 bool shade(
double,
double,
double,
double,
int*,
int*,
int*,
int* );
96 void setClip(
bool clip ) { mClip = clip; }
97 bool clip()
const {
return mClip; }
124 bool discreteColor(
double,
int*,
int*,
int*,
int* );
129 bool exactColor(
double,
int*,
int*,
int*,
int* );
134 bool interpolatedColor(
double,
int*,
int*,
int*,
int* );
ColorRampItem(double val, QColor col, QString lbl=QString())
convenience constructor - added in v1.6
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
bool operator<(const ColorRampItem &other) const
QList< QgsColorRampShader::ColorRampItem > mColorRampItemList
This vector holds the information for classification based on values.
virtual bool shade(double, int *, int *, int *, int *)
generates and new RGBA value based on one input value
QMap< double, QColor > mColorCache
Cache of values that have already been looked up.
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...
void setMaximumColorCacheSize(int theSize)
Set the maximum size the color cache can be.
QgsColorRampShader::ColorRamp_TYPE mColorRampType
The color ramp type.
bool mClip
Do not render values out of range.
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
int maximumColorCacheSize()
Get the maximum size the color cache can be.
int mCurrentColorRampItemIndex
Current index from which to start searching the color table.
int mMaximumColorCacheSize
Maximum size of the color cache.