From 5ef38ea2335bfffe79bdfbf26e51cc0bd76699d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 8 Feb 2023 16:55:50 +0100 Subject: [PATCH] Math: reorder Color4 overloads to have the same names together. No functional change. --- src/Magnum/Math/Color.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index cce3d842f..381c1f5a4 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -765,24 +765,6 @@ class Color4: public Vector4 { return {Implementation::fromSrgbAlpha(srgbAlpha)}; } - /** - * @brief Create linear RGBA color from sRGB representation - * @param srgb Color in sRGB color space - * @param a Alpha value, defaults to @cpp 1.0 @ce for - * floating-point types and maximum positive value for integral - * types - * - * Applies inverse sRGB curve onto RGB channels of the input. Alpha - * value is taken as-is. See @ref Color3::fromSrgb() for more - * information. - * @see @link operator""_srgbaf @endlink, @ref toSrgbAlpha() - */ - /* Input is a Vector3 to hint that it doesn't have any (additive, - multiplicative) semantics of a linear RGB color */ - static Color4 fromSrgb(const Vector3& srgb, T a = Implementation::fullChannel()) { - return {Implementation::fromSrgb(srgb), a}; - } - /** @overload * @brief Create linear RGB color from integral sRGB + alpha representation * @param srgbAlpha Color in sRGB color space with linear alpha @@ -806,6 +788,24 @@ class Color4: public Vector4 { return {Implementation::fromSrgbAlphaIntegral(srgbAlpha)}; } + /** + * @brief Create linear RGBA color from sRGB representation + * @param srgb Color in sRGB color space + * @param a Alpha value, defaults to @cpp 1.0 @ce for + * floating-point types and maximum positive value for integral + * types + * + * Applies inverse sRGB curve onto RGB channels of the input. Alpha + * value is taken as-is. See @ref Color3::fromSrgb() for more + * information. + * @see @link operator""_srgbaf @endlink, @ref toSrgbAlpha() + */ + /* Input is a Vector3 to hint that it doesn't have any (additive, + multiplicative) semantics of a linear RGB color */ + static Color4 fromSrgb(const Vector3& srgb, T a = Implementation::fullChannel()) { + return {Implementation::fromSrgb(srgb), a}; + } + /** @overload * @brief Create linear RGB color from integral sRGB representation * @param srgb Color in sRGB color space