21 #ifndef QGSCOLORRAMPSHADER_H 22 #define QGSCOLORRAMPSHADER_H 24 #include "qgis_core.h" 90 ColorRampItem(
double val,
const QColor &col,
const QString &lbl = QString() )
105 QList<QgsColorRampShader::ColorRampItem>
colorRampItemList()
const {
return mColorRampItemList.toList(); }
111 QString colorRampTypeAsQString();
114 void setColorRampItemList(
const QList<QgsColorRampShader::ColorRampItem> &list );
134 void setColorRampType(
const QString &type );
154 bool shade(
double value,
int *returnRedValue
SIP_OUT,
int *returnGreenValue SIP_OUT,
int *returnBlueValue SIP_OUT,
int *returnAlphaValue SIP_OUT )
override;
157 bool shade(
double redValue,
double greenValue,
158 double blueValue,
double alphaValue,
159 int *returnRedValue SIP_OUT,
int *returnGreenValue SIP_OUT,
160 int *returnBlueValue SIP_OUT,
int *returnAlphaValue SIP_OUT )
override;
162 void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems SIP_OUT )
const override;
181 bool clip()
const {
return mClip; }
196 QVector<QgsColorRampShader::ColorRampItem> mColorRampItemList;
205 double mLUTOffset = 0.0;
206 double mLUTFactor = 1.0;
207 bool mLUTInitialized =
false;
A rectangle specified with double values.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Abstract base class for color ramps.
QList< QgsColorRampShader::ColorRampItem > colorRampItemList() const
Returns the custom colormap.
void setClip(bool clip)
Sets whether the shader should not render values out of range.
Type
Supported methods for color interpolation.
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
Base class for processing filters like renderers, reprojector, resampler etc.
Type colorRampType() const
Returns the color ramp type.
std::unique_ptr< QgsColorRamp > mSourceColorRamp
Source color ramp.
void setClassificationMode(ClassificationMode classificationMode)
Sets classification mode.
bool clip() const
Returns whether the shader will clip values which are out of range.
Interpolates the color between two class breaks linearly.
ClassificationMode
Classification modes used to create the color ramp shader.
Assigns the color of the higher class for every pixel between two class breaks.
ClassificationMode classificationMode() const
Returns the classification mode.
bool operator<(const QgsColorRampShader::ColorRampItem &other) const