lsst.afw gf03f0b42f3+b1047159b2
Loading...
Searching...
No Matches
lsst::afw::image::Color Class Referencefinal

Describe the colour of a source. More...

#include <Color.h>

Public Member Functions

 Color () noexcept
 Default: indeterminate color.
 
 Color (double color_value, std::string const &color_type) noexcept
 Fully-specified color: both a numeric value and its type string.
 
 Color (Color const &)=default
 
 Color (Color &&)=default
 
Coloroperator= (Color const &)=default
 
Coloroperator= (Color &&)=default
 
 ~Color () noexcept=default
 
bool isIndeterminate () const noexcept
 Whether this Color was default‑constructed (i.e. has no value/type).
 
double getColorValue () const noexcept
 The numeric color value; only valid if !isIndeterminate().
 
std::string const & getColorType () const noexcept
 The color type string (e.g. "g-r"); only valid if !isIndeterminate().
 
bool operator== (Color const &other) const noexcept
 Equality comparison for colors.
 
bool operator!= (Color const &other) const noexcept
 

Detailed Description

Describe the colour of a source.

Inputs are color type (a string, for exemple 'g-r') and its color value (float).

Definition at line 23 of file Color.h.

Constructor & Destructor Documentation

◆ Color() [1/4]

lsst::afw::image::Color::Color ( )
inlinenoexcept

Default: indeterminate color.

Definition at line 26 of file Color.h.

◆ Color() [2/4]

lsst::afw::image::Color::Color ( double color_value,
std::string const & color_type )
inlinenoexcept

Fully-specified color: both a numeric value and its type string.

Definition at line 32 of file Color.h.

◆ Color() [3/4]

lsst::afw::image::Color::Color ( Color const & )
default

◆ Color() [4/4]

lsst::afw::image::Color::Color ( Color && )
default

◆ ~Color()

lsst::afw::image::Color::~Color ( )
defaultnoexcept

Member Function Documentation

◆ getColorType()

std::string const & lsst::afw::image::Color::getColorType ( ) const
inlinenoexcept

The color type string (e.g. "g-r"); only valid if !isIndeterminate().

Definition at line 48 of file Color.h.

◆ getColorValue()

double lsst::afw::image::Color::getColorValue ( ) const
inlinenoexcept

The numeric color value; only valid if !isIndeterminate().

Definition at line 45 of file Color.h.

◆ isIndeterminate()

bool lsst::afw::image::Color::isIndeterminate ( ) const
inlinenoexcept

Whether this Color was default‑constructed (i.e. has no value/type).

Definition at line 42 of file Color.h.

◆ operator!=()

bool lsst::afw::image::Color::operator!= ( Color const & other) const
inlinenoexcept

Definition at line 65 of file Color.h.

◆ operator=() [1/2]

Color & lsst::afw::image::Color::operator= ( Color && )
default

◆ operator=() [2/2]

Color & lsst::afw::image::Color::operator= ( Color const & )
default

◆ operator==()

bool lsst::afw::image::Color::operator== ( Color const & other) const
inlinenoexcept

Equality comparison for colors.

Indeterminate colors compare equal to each other; fully-specified colors compare by both value and type.

Definition at line 56 of file Color.h.


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