[raster] Add note and docs for psuedocolor 'clip' option

This commit is contained in:
Nyall Dawson 2016-04-12 11:08:37 +10:00
parent ce2891b10e
commit 6df1f6866c
3 changed files with 20 additions and 1 deletions

View File

@ -65,6 +65,14 @@ class QgsColorRampShader : QgsRasterShaderFunction
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
/** Sets whether the shader should not render values out of range.
* @param clip set to true to clip values which are out of range.
* @see clip()
*/
void setClip( bool clip );
/** Returns whether the shader will clip values which are out of range.
* @see setClip()
*/
bool clip() const;
};

View File

@ -93,7 +93,15 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const override;
/** Sets whether the shader should not render values out of range.
* @param clip set to true to clip values which are out of range.
* @see clip()
*/
void setClip( bool clip ) { mClip = clip; }
/** Returns whether the shader will clip values which are out of range.
* @see setClip()
*/
bool clip() const { return mClip; }
private:

View File

@ -177,8 +177,11 @@
</item>
<item>
<widget class="QCheckBox" name="mClipCheckBox">
<property name="toolTip">
<string>If checked, any pixels with a value out of range will not be rendered</string>
</property>
<property name="text">
<string>Clip</string>
<string>Clip raster values which are out of range</string>
</property>
</widget>
</item>