|bool||hasSameCoordinates (const LchaDouble &other) const|
A LCH color with alpha channel.
Storage of floating point LCH values with
The data is not default-initialized; it is undefined when the object is created.
More details about the valid range: Range of LCH values
- This class intentionally does not provide the operators equal to (
operator==) and not equal to (
operator!=). As LCH colors are polar coordinates, there are various valid representations of the same angle. And h is even meaningless when C is zero; on the other hand, there might nevertheless be an interest in preserving h. And invalid values with L=200 or L=300: Should they be equal because both are invalid? Or are they different? The answer to all these questions depends on your use case. To avoid confusion, no comparison operators are provided by this class. See also hasSameCoordinates.
This type is declared as type to Qt’s type system via
Q_DECLARE_METATYPE. Depending on your use case (for example if you want to use for queued signal-slot connections), you might consider calling
qRegisterMetaType() for this type, once you have a QApplication object.
This data type can be passed to QDebug thanks to operator<<(QDebug dbg, const PerceptualColor::LchaDouble &value)
Member Function Documentation
|bool PerceptualColor::LchaDouble::hasSameCoordinates||(||const LchaDouble &||other||)||const|
Compares coordinates with another object.
other The object to compare with
trueif all three coordinates l, c and h of this object are all equal to the coordinates of other.
falseotherwise. Note that two objects with equal l and equal c, but one with h = 5° and the other with h = 365°, are considered non-equal thought both describe the same point in the coordinate space.
Member Data Documentation
0 means no chroma (grayscale). The maximum value depends on the gamut. For sRGB for example it’s a given value, but other gamuts can be bigger, but the practical limit is the gamut of the human perception, beyond which a Chroma value does not make sense.
The documentation for this struct was generated from the following files: