Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Trace::CieLab Class Reference

#include <cielab.h>

Public Member Functions

 CieLab ()
 
 CieLab (uint32_t rgb)
 Construct this CieLab from an ARGB value.
 
 CieLab (float l, float a, float b)
 
 CieLab (CieLab const &other)
 
CieLaboperator= (CieLab const &other)
 
float operator() (unsigned index) const
 Retrieve a CieLab value via index.
 
void add (CieLab const &other)
 
void mul (float scale)
 
uint32_t toRGB () const
 Return this CieLab's value converted to an ARGB value.
 

Static Public Member Functions

static float diffSq (CieLab const &c1, CieLab const &c2)
 Squared Euclidean distance between two colors in CieLab space.
 
static float diff (CieLab const &c1, CieLab const &c2)
 Computes euclidean distance in CieLab space between two colors.
 

Public Attributes

unsigned C
 
float L
 
float A
 
float B
 

Detailed Description

Definition at line 15 of file cielab.h.

Constructor & Destructor Documentation

◆ CieLab() [1/4]

Inkscape::Trace::CieLab::CieLab ( )
inline

Definition at line 18 of file cielab.h.

References A, B, C, and L.

◆ CieLab() [2/4]

Inkscape::Trace::CieLab::CieLab ( uint32_t  rgb)

Construct this CieLab from an ARGB value.

Definition at line 109 of file cielab.cpp.

References A, B, C, cbrt, L, and rgb.

◆ CieLab() [3/4]

Inkscape::Trace::CieLab::CieLab ( float  l,
float  a,
float  b 
)
inline

Definition at line 29 of file cielab.h.

References A, B, C, and L.

◆ CieLab() [4/4]

Inkscape::Trace::CieLab::CieLab ( CieLab const &  other)
inline

Definition at line 37 of file cielab.h.

References A, B, C, and L.

Member Function Documentation

◆ add()

void Inkscape::Trace::CieLab::add ( CieLab const &  other)
inline

Definition at line 67 of file cielab.h.

References A, B, C, and L.

Referenced by Inkscape::Trace::Siox::colorSignatureStage1(), and Inkscape::Trace::Siox::colorSignatureStage2().

◆ diff()

float Inkscape::Trace::CieLab::diff ( CieLab const &  c1,
CieLab const &  c2 
)
static

Computes euclidean distance in CieLab space between two colors.

Definition at line 210 of file cielab.cpp.

References diffSq().

Referenced by Inkscape::Trace::Siox::fillColorRegions().

◆ diffSq()

float Inkscape::Trace::CieLab::diffSq ( CieLab const &  c1,
CieLab const &  c2 
)
static

Squared Euclidean distance between two colors in CieLab space.

Definition at line 203 of file cielab.cpp.

References A, B, and L.

Referenced by diff(), and Inkscape::Trace::Siox::extractForeground().

◆ mul()

void Inkscape::Trace::CieLab::mul ( float  scale)
inline

Definition at line 75 of file cielab.h.

References A, B, L, and scale.

Referenced by Inkscape::Trace::Siox::colorSignatureStage1(), and Inkscape::Trace::Siox::colorSignatureStage2().

◆ operator()()

float Inkscape::Trace::CieLab::operator() ( unsigned  index) const
inline

Retrieve a CieLab value via index.

Definition at line 57 of file cielab.h.

References A, B, index, and L.

◆ operator=()

CieLab & Inkscape::Trace::CieLab::operator= ( CieLab const &  other)
inline

Definition at line 45 of file cielab.h.

References A, B, C, and L.

◆ toRGB()

uint32_t Inkscape::Trace::CieLab::toRGB ( ) const

Return this CieLab's value converted to an ARGB value.

Definition at line 162 of file cielab.cpp.

References A, B, and L.

Member Data Documentation

◆ A

float Inkscape::Trace::CieLab::A

Definition at line 99 of file cielab.h.

Referenced by add(), CieLab(), CieLab(), CieLab(), CieLab(), diffSq(), mul(), operator()(), operator=(), and toRGB().

◆ B

float Inkscape::Trace::CieLab::B

Definition at line 100 of file cielab.h.

Referenced by add(), CieLab(), CieLab(), CieLab(), CieLab(), diffSq(), mul(), operator()(), operator=(), and toRGB().

◆ C

unsigned Inkscape::Trace::CieLab::C

◆ L

float Inkscape::Trace::CieLab::L

Definition at line 98 of file cielab.h.

Referenced by add(), CieLab(), CieLab(), CieLab(), CieLab(), diffSq(), mul(), operator()(), operator=(), and toRGB().


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