Krita Source Code Documentation
Loading...
Searching...
No Matches
KisColorimetryUtils::xyY Struct Reference

#include <KisColorimetryUtils.h>

Public Member Functions

bool operator== (const xyY &other) const
 
XYZ toXYZ () const
 

Public Attributes

double x
 
double y
 
double Y
 

Detailed Description

Definition at line 40 of file KisColorimetryUtils.h.

Member Function Documentation

◆ operator==()

bool KisColorimetryUtils::xyY::operator== ( const xyY & other) const

Definition at line 64 of file KisColorimetryUtils.cpp.

65{
66 return qFuzzyCompare(x, other.x) && qFuzzyCompare(y, other.y) && qFuzzyCompare(Y, other.Y);
67}
static bool qFuzzyCompare(half p1, half p2)

References qFuzzyCompare(), x, y, and Y.

◆ toXYZ()

XYZ KisColorimetryUtils::xyY::toXYZ ( ) const

Definition at line 52 of file KisColorimetryUtils.cpp.

53{
54 if (qFuzzyIsNull(y)) {
55 return XYZ{0, 0, 0};
56 }
57 return XYZ{
58 .X = Y * x / y,
59 .Y = Y,
60 .Z = Y * (1 - x - y) / y,
61 };
62}
static bool qFuzzyIsNull(half h)

References qFuzzyIsNull(), x, KisColorimetryUtils::XYZ::X, y, and Y.

Member Data Documentation

◆ x

double KisColorimetryUtils::xyY::x

Definition at line 41 of file KisColorimetryUtils.h.

◆ y

double KisColorimetryUtils::xyY::y

Definition at line 42 of file KisColorimetryUtils.h.

◆ Y

double KisColorimetryUtils::xyY::Y

Definition at line 43 of file KisColorimetryUtils.h.


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