diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-04 21:18:54 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-04 21:18:54 +0200 |
| commit | 6281e3d5e9ef094d7c8495dfa56a58c47be163ec (patch) | |
| tree | 3d7db08be2a4e227e2b9d14f9c6db7f65feee5e2 /src/colour_conversion.h | |
| parent | 87cd4af7a2171000bb190c274633f28cf35e2223 (diff) | |
White space: colour_conversion.{cc,h}
Diffstat (limited to 'src/colour_conversion.h')
| -rw-r--r-- | src/colour_conversion.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/colour_conversion.h b/src/colour_conversion.h index 29140541..3cfbf969 100644 --- a/src/colour_conversion.h +++ b/src/colour_conversion.h @@ -71,11 +71,11 @@ enum class YUVToRGB { class ColourConversion { public: - ColourConversion () - : _yuv_to_rgb (YUVToRGB::REC601) + ColourConversion() + : _yuv_to_rgb(YUVToRGB::REC601) {} - ColourConversion ( + ColourConversion( std::shared_ptr<const TransferFunction> in, YUVToRGB yuv_to_rgb, Chromaticity red, @@ -86,87 +86,87 @@ public: std::shared_ptr<const TransferFunction> out ); - std::shared_ptr<const TransferFunction> in () const { + std::shared_ptr<const TransferFunction> in() const { return _in; } - YUVToRGB yuv_to_rgb () const { + YUVToRGB yuv_to_rgb() const { return _yuv_to_rgb; } - Chromaticity red () const { + Chromaticity red() const { return _red; } - Chromaticity green () const { + Chromaticity green() const { return _green; } - Chromaticity blue () const { + Chromaticity blue() const { return _blue; } - Chromaticity white () const { + Chromaticity white() const { return _white; } - boost::optional<Chromaticity> adjusted_white () const { + boost::optional<Chromaticity> adjusted_white() const { return _adjusted_white; } - std::shared_ptr<const TransferFunction> out () const { + std::shared_ptr<const TransferFunction> out() const { return _out; } - void set_in (std::shared_ptr<const TransferFunction> f) { + void set_in(std::shared_ptr<const TransferFunction> f) { _in = f; } - void set_yuv_to_rgb (YUVToRGB y) { + void set_yuv_to_rgb(YUVToRGB y) { _yuv_to_rgb = y; } - void set_red (Chromaticity red) { + void set_red(Chromaticity red) { _red = red; } - void set_green (Chromaticity green) { + void set_green(Chromaticity green) { _green = green; } - void set_blue (Chromaticity blue) { + void set_blue(Chromaticity blue) { _blue = blue; } - void set_white (Chromaticity white) { + void set_white(Chromaticity white) { _white = white; } - void set_adjusted_white (Chromaticity adjusted_white) { + void set_adjusted_white(Chromaticity adjusted_white) { _adjusted_white = adjusted_white; } - void unset_adjusted_white () { - _adjusted_white = boost::optional<Chromaticity> (); + void unset_adjusted_white() { + _adjusted_white = boost::optional<Chromaticity>(); } - void set_out (std::shared_ptr<const TransferFunction> f) { + void set_out(std::shared_ptr<const TransferFunction> f) { _out = f; } - bool about_equal (ColourConversion const & other, float epsilon) const; + bool about_equal(ColourConversion const & other, float epsilon) const; - boost::numeric::ublas::matrix<double> rgb_to_xyz () const; - boost::numeric::ublas::matrix<double> xyz_to_rgb () const; - boost::numeric::ublas::matrix<double> bradford () const; + boost::numeric::ublas::matrix<double> rgb_to_xyz() const; + boost::numeric::ublas::matrix<double> xyz_to_rgb() const; + boost::numeric::ublas::matrix<double> bradford() const; - static ColourConversion const & srgb_to_xyz (); - static ColourConversion const & rec601_to_xyz (); - static ColourConversion const & rec709_to_xyz (); - static ColourConversion const & p3_to_xyz (); - static ColourConversion const & rec1886_to_xyz (); - static ColourConversion const & rec2020_to_xyz (); - static ColourConversion const & s_gamut3_to_xyz (); + static ColourConversion const & srgb_to_xyz(); + static ColourConversion const & rec601_to_xyz(); + static ColourConversion const & rec709_to_xyz(); + static ColourConversion const & p3_to_xyz(); + static ColourConversion const & rec1886_to_xyz(); + static ColourConversion const & rec2020_to_xyz(); + static ColourConversion const & s_gamut3_to_xyz(); protected: /** Input transfer function (probably a gamma function, or something similar) */ |
