Skip to content

Commit

Permalink
[raster] Add note and docs for psuedocolor 'clip' option
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 12, 2016
1 parent ce2891b commit 6df1f68
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions python/core/raster/qgscolorrampshader.sip
Expand Up @@ -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;
};
8 changes: 8 additions & 0 deletions src/core/raster/qgscolorrampshader.h
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion src/ui/qgssinglebandpseudocolorrendererwidgetbase.ui
Expand Up @@ -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>
Expand Down

0 comments on commit 6df1f68

Please sign in to comment.