|
QGIS API Documentation
3.6.0-Noosa (5873452)
|
Totally random color ramp. More...
#include <qgscolorramp.h>

Public Member Functions | |
| QgsRandomColorRamp ()=default | |
| Constructor for QgsRandomColorRamp. More... | |
| QgsRandomColorRamp * | clone () const override |
| Creates a clone of the color ramp. More... | |
| QColor | color (double value) const override |
| Returns the color corresponding to a specified value. More... | |
| int | count () const override |
| Returns number of defined colors, or -1 if undefined. More... | |
| QgsStringMap | properties () const override |
| Returns a string map containing all the color ramp's properties. More... | |
| virtual void | setTotalColorCount (int colorCount) |
| Sets the desired total number of unique colors for the resultant ramp. More... | |
| QString | type () const override |
| Returns a string representing the color ramp type. More... | |
| double | value (int index) const override |
| Returns relative value between [0,1] of color at specified index. More... | |
Public Member Functions inherited from QgsColorRamp | |
| virtual | ~QgsColorRamp ()=default |
| virtual void | invert () |
| Inverts the ordering of the color ramp. More... | |
Protected Attributes | |
| QList< QColor > | mPrecalculatedColors |
| int | mTotalColorCount = 0 |
Totally random color ramp.
Returns colors generated at random, but constrained to some hardcoded saturation and value ranges to prevent ugly color generation.
Definition at line 427 of file qgscolorramp.h.
|
default |
Constructor for QgsRandomColorRamp.
|
overridevirtual |
Creates a clone of the color ramp.
Implements QgsColorRamp.
Definition at line 483 of file qgscolorramp.cpp.
|
overridevirtual |
Returns the color corresponding to a specified value.
| value | value between [0, 1] inclusive |
Implements QgsColorRamp.
Definition at line 426 of file qgscolorramp.cpp.
|
overridevirtual |
Returns number of defined colors, or -1 if undefined.
Implements QgsColorRamp.
Definition at line 415 of file qgscolorramp.cpp.
|
overridevirtual |
Returns a string map containing all the color ramp's properties.
Implements QgsColorRamp.
Definition at line 488 of file qgscolorramp.cpp.
|
virtual |
Sets the desired total number of unique colors for the resultant ramp.
Calling this method pregenerates a set of visually distinct colors which are returned by subsequent calls to color().
| colorCount | number of unique colors |
Definition at line 446 of file qgscolorramp.cpp.
|
overridevirtual |
Returns a string representing the color ramp type.
Implements QgsColorRamp.
Definition at line 478 of file qgscolorramp.cpp.
|
overridevirtual |
Returns relative value between [0,1] of color at specified index.
Implements QgsColorRamp.
Definition at line 420 of file qgscolorramp.cpp.
|
protected |
Definition at line 460 of file qgscolorramp.h.
|
protected |
Definition at line 459 of file qgscolorramp.h.
1.8.13