Navigation Menu

Skip to content

Commit

Permalink
Added convenience constructor for color ramp shader
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14023 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Aug 7, 2010
1 parent 38e5d59 commit 603a3dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/core/qgsrastershaderfunction.sip
Expand Up @@ -52,6 +52,11 @@ class QgsColorRampShader : QgsRasterShaderFunction
//not a color but a quantity, e.g. temperature or elevation
struct ColorRampItem
{
//! default constructor
ColorRampItem();
//! convenience constructor - added in v1.6
ColorRampItem( double val, QColor col, QString lbl = QString() );

QString label;
double value;
QColor color;
Expand Down
5 changes: 5 additions & 0 deletions src/core/raster/qgscolorrampshader.h
Expand Up @@ -41,6 +41,11 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
//not a color but a quantity, e.g. temperature or elevation
struct ColorRampItem
{
//! default constructor
ColorRampItem() {}
//! convenience constructor - added in v1.6
ColorRampItem( double val, QColor col, QString lbl = QString() ) : label(lbl), value(val), color(col) {}

QString label;
double value;
QColor color;
Expand Down

0 comments on commit 603a3dd

Please sign in to comment.