35 sipType = sipType_QgsGradientColorRamp;
37 sipType = sipType_QgsLimitedRandomColorRamp;
39 sipType = sipType_QgsRandomColorRamp;
41 sipType = sipType_QgsPresetSchemeColorRamp;
43 sipType = sipType_QgsColorBrewerColorRamp;
45 sipType = sipType_QgsCptCityColorRamp;
62 virtual double value(
int index )
const = 0;
69 virtual QColor
color(
double value )
const = 0;
74 virtual QString
type()
const = 0;
101 static QList< QPair< QString, QString > > rampTypes();
static QString typeString()
Returns the string identifier for QgsColorBrewerColorRamp.
Abstract base class for color ramps.
virtual QColor color(double value) const =0
Returns the color corresponding to a specified value.
virtual int count() const =0
Returns number of defined colors, or -1 if undefined.
virtual double value(int index) const =0
Returns relative value between [0,1] of color at specified index.
virtual QVariantMap properties() const =0
Returns a string map containing all the color ramp's properties.
virtual QgsColorRamp * clone() const =0
Creates a clone of the color ramp.
virtual QString type() const =0
Returns a string representing the color ramp type.
virtual void invert()
Inverts the ordering of the color ramp.
static QString typeString()
Returns the string identifier for QgsCptCityColorRamp.
static QString typeString()
Returns the string identifier for QgsGradientColorRamp.
static QString typeString()
Returns the string identifier for QgsLimitedRandomColorRamp.
static QString typeString()
Returns the string identifier for QgsPresetSchemeColorRamp.
static QString typeString()
Returns the string identifier for QgsRandomColorRamp.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)