QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
QgsGradientStop Class Reference

Represents a color stop within a QgsGradientColorRamp color ramp. More...

#include <qgscolorrampimpl.h>

Public Member Functions

 QgsGradientStop (double offset, const QColor &color)
 Constructor for QgsGradientStop.
 
QColor::Spec colorSpec () const
 Returns the color specification in which the color component interpolation will occur.
 
Qgis::AngularDirection direction () const
 Returns the direction to traverse the color wheel using when interpolating hue-based color specifications.
 
bool operator!= (const QgsGradientStop &other) const
 
bool operator== (const QgsGradientStop &other) const
 
void setColorSpec (QColor::Spec spec)
 Sets the color specification in which the color component interpolation will occur.
 
void setDirection (Qgis::AngularDirection direction)
 Sets the direction to traverse the color wheel using when interpolating hue-based color specifications.
 

Public Attributes

QColor color
 Gradient color at stop.
 
double offset
 Relative positional offset, between 0 and 1.
 

Friends

class QgsGradientColorRamp
 

Detailed Description

Represents a color stop within a QgsGradientColorRamp color ramp.

Definition at line 37 of file qgscolorrampimpl.h.

Constructor & Destructor Documentation

◆ QgsGradientStop()

QgsGradientStop::QgsGradientStop ( double  offset,
const QColor &  color 
)

Constructor for QgsGradientStop.

Parameters
offsetpositional offset for stop, between 0 and 1.0
colorcolor for stop

Definition at line 206 of file qgscolorrampimpl.cpp.

Member Function Documentation

◆ colorSpec()

QColor::Spec QgsGradientStop::colorSpec ( ) const
inline

Returns the color specification in which the color component interpolation will occur.

For multi-stop gradients this color spec will be used for the portion of the color ramp leading into the current stop.

See also
setColorSpec()
Since
QGIS 3.24

Definition at line 72 of file qgscolorrampimpl.h.

◆ direction()

Qgis::AngularDirection QgsGradientStop::direction ( ) const
inline

Returns the direction to traverse the color wheel using when interpolating hue-based color specifications.

For multi-stop gradients this direction will be used for the portion of the color ramp leading into the current stop.

See also
setDirection()
Since
QGIS 3.24

Definition at line 97 of file qgscolorrampimpl.h.

◆ operator!=()

bool QgsGradientStop::operator!= ( const QgsGradientStop other) const
inline

Definition at line 58 of file qgscolorrampimpl.h.

◆ operator==()

bool QgsGradientStop::operator== ( const QgsGradientStop other) const
inline

Definition at line 53 of file qgscolorrampimpl.h.

◆ setColorSpec()

void QgsGradientStop::setColorSpec ( QColor::Spec  spec)

Sets the color specification in which the color component interpolation will occur.

Only QColor::Spec::Rgb, QColor::Spec::Hsv and QColor::Spec::Hsl are currently supported.

For multi-stop gradients this color spec will be used for the portion of the color ramp leading into the current stop.

See also
colorSpec()
Since
QGIS 3.24

Definition at line 214 of file qgscolorrampimpl.cpp.

◆ setDirection()

void QgsGradientStop::setDirection ( Qgis::AngularDirection  direction)
inline

Sets the direction to traverse the color wheel using when interpolating hue-based color specifications.

For multi-stop gradients this direction will be used for the portion of the color ramp leading into the current stop.

See also
direction()
Since
QGIS 3.24

Definition at line 109 of file qgscolorrampimpl.h.

Friends And Related Symbol Documentation

◆ QgsGradientColorRamp

friend class QgsGradientColorRamp
friend

Definition at line 117 of file qgscolorrampimpl.h.

Member Data Documentation

◆ color

QColor QgsGradientStop::color

Gradient color at stop.

Definition at line 51 of file qgscolorrampimpl.h.

◆ offset

double QgsGradientStop::offset

Relative positional offset, between 0 and 1.

Definition at line 49 of file qgscolorrampimpl.h.


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