QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | List of all members
QgsColorRampShader Class Reference

A ramp shader will color a raster pixel based on a list of values ranges in a ramp. More...

#include <qgscolorrampshader.h>

Inheritance diagram for QgsColorRampShader:
Inheritance graph
[legend]

Classes

struct  ColorRampItem
 

Public Types

enum  ColorRamp_TYPE { INTERPOLATED, DISCRETE, EXACT }
 

Public Member Functions

 QgsColorRampShader (double theMinimumValue=0.0, double theMaximumValue=255.0)
 
QList
< QgsColorRampShader::ColorRampItem
colorRampItemList () const
 Get the custom colormap. More...
 
QgsColorRampShader::ColorRamp_TYPE colorRampType () const
 Get the color ramp type. More...
 
QString colorRampTypeAsQString ()
 Get the color ramp type as a string. More...
 
int maximumColorCacheSize ()
 Get the maximum size the color cache can be. More...
 
void setColorRampItemList (const QList< QgsColorRampShader::ColorRampItem > &theList)
 Set custom colormap. More...
 
void setColorRampType (QgsColorRampShader::ColorRamp_TYPE theColorRampType)
 Set the color ramp type. More...
 
void setColorRampType (QString)
 Set the color ramp type. More...
 
void setMaximumColorCacheSize (int theSize)
 Set the maximum size the color cache can be. More...
 
bool shade (double, int *, int *, int *, int *)
 Generates and new RGB value based on one input value. More...
 
bool shade (double, double, double, double, int *, int *, int *, int *)
 Generates and new RGB value based on original RGB value. More...
 
void legendSymbologyItems (QList< QPair< QString, QColor > > &symbolItems) const
 
void setClip (bool clip)
 
bool clip () const
 
- Public Member Functions inherited from QgsRasterShaderFunction
 QgsRasterShaderFunction (double theMinimumValue=0.0, double theMaximumValue=255.0)
 
virtual ~QgsRasterShaderFunction ()
 
virtual void setMaximumValue (double)
 Set the maximum value. More...
 
virtual void setMinimumValue (double)
 Return the minimum value. More...
 
double minimumMaximumRange () const
 
double minimumValue () const
 
double maximumValue () const
 

Additional Inherited Members

- Protected Attributes inherited from QgsRasterShaderFunction
double mMaximumValue
 User defineable maximum value for the shading function. More...
 
double mMinimumValue
 User defineable minimum value for the shading function. More...
 
double mMinimumMaximumRange
 Minimum maximum range for the shading function. More...
 

Detailed Description

A ramp shader will color a raster pixel based on a list of values ranges in a ramp.

Constructor & Destructor Documentation

QgsColorRampShader::QgsColorRampShader ( double  theMinimumValue = 0.0,
double  theMaximumValue = 255.0 
)

Member Function Documentation

bool QgsColorRampShader::clip ( ) const
inline
QList<QgsColorRampShader::ColorRampItem> QgsColorRampShader::colorRampItemList ( ) const
inline

Get the custom colormap.

QgsColorRampShader::ColorRamp_TYPE QgsColorRampShader::colorRampType ( ) const
inline

Get the color ramp type.

QString QgsColorRampShader::colorRampTypeAsQString ( )

Get the color ramp type as a string.

void QgsColorRampShader::legendSymbologyItems ( QList< QPair< QString, QColor > > &  symbolItems) const
virtual

Reimplemented from QgsRasterShaderFunction.

int QgsColorRampShader::maximumColorCacheSize ( )
inline

Get the maximum size the color cache can be.

void QgsColorRampShader::setClip ( bool  clip)
inline
void QgsColorRampShader::setColorRampItemList ( const QList< QgsColorRampShader::ColorRampItem > &  theList)

Set custom colormap.

void QgsColorRampShader::setColorRampType ( QgsColorRampShader::ColorRamp_TYPE  theColorRampType)

Set the color ramp type.

void QgsColorRampShader::setColorRampType ( QString  theType)

Set the color ramp type.

void QgsColorRampShader::setMaximumColorCacheSize ( int  theSize)
inline

Set the maximum size the color cache can be.

bool QgsColorRampShader::shade ( double  theValue,
int *  theReturnRedValue,
int *  theReturnGreenValue,
int *  theReturnBlueValue,
int *  theReturnAlphaValue 
)
virtual

Generates and new RGB value based on one input value.

Reimplemented from QgsRasterShaderFunction.

bool QgsColorRampShader::shade ( double  theRedValue,
double  theGreenValue,
double  theBlueValue,
double  theAlphaValue,
int *  theReturnRedValue,
int *  theReturnGreenValue,
int *  theReturnBlueValue,
int *  theReturnAlphaValue 
)
virtual

Generates and new RGB value based on original RGB value.

Reimplemented from QgsRasterShaderFunction.


The documentation for this class was generated from the following files: