// Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \class QRgbaFloat \brief The QRgbaFloat struct contains a four part RGBA floating-point color. \since 6.2 \ingroup painting \inmodule QtGui \sa QRgb, QRgba64, QColor */ /*! \typealias QRgbaFloat::FastType Alias for \e float. */ /*! \typedef QRgbaFloat16 \relates QRgbaFloat A 64-bit data-structure containing four 16-bit floating point color channels: Red, green, blue and alpha. */ /*! \typedef QRgbaFloat32 \relates QRgbaFloat A 128-bit data-structure containing four 32-bit floating point color channels: Red, green, blue and alpha. */ /*! \fn template QRgbaFloat::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a) Constructs a QRgbaFloat value from the four 16-bit integer color channels \a red, \a green, \a blue and \a alpha. \sa fromRgba() */ /*! \fn template QRgbaFloat::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha) Constructs a QRgbaFloat value from the four 8-bit color channels \a red, \a green, \a blue and \a alpha. \sa fromArgb32() */ /*! \fn template QRgbaFloat::fromArgb32(uint rgb) Constructs a QRgbaFloat value from the 32bit ARGB value \a rgb. \sa fromRgba(), toArgb32() */ /*! \fn template bool QRgbaFloat::isOpaque() const Returns whether the color is fully opaque. \sa isTransparent(), alpha() */ /*! \fn template bool QRgbaFloat::isTransparent() const Returns whether the color is fully transparent. \sa isOpaque(), alpha() */ /*! \fn template float QRgbaFloat::red() const Returns the red color component. \sa setRed() */ /*! \fn template void QRgbaFloat::setRed(QRgbaFloat::FastType red) Sets the red color component of this color to \a red. \sa red() */ /*! \fn template float QRgbaFloat::green() const Returns the green color component. \sa setGreen() */ /*! \fn template void QRgbaFloat::setGreen(QRgbaFloat::FastType green) Sets the green color component of this color to \a green. \sa green() */ /*! \fn template float QRgbaFloat::blue() const Returns the blue color component. \sa setBlue() */ /*! \fn template void QRgbaFloat::setBlue(QRgbaFloat::FastType blue) Sets the blue color component of this color to \a blue. \sa blue() */ /*! \fn template float QRgbaFloat::alpha() const Returns the alpha channel. \sa setAlpha() */ /*! \fn template void QRgbaFloat::setAlpha(QRgbaFloat::FastType alpha) Sets the alpha of this color to \a alpha. \sa alpha() */ /*! \fn template float QRgbaFloat::redNormalized() const Returns the red color component normalized to values between \c 0.0f and \c 1.0f. \sa setRed() */ /*! \fn template float QRgbaFloat::greenNormalized() const Returns the green color component normalized to values between \c 0.0f and \c 1.0f. \sa setGreen() */ /*! \fn template float QRgbaFloat::blueNormalized() const Returns the blue color component normalized to values between \c 0.0f and \c 1.0f. \sa setBlue() */ /*! \fn template float QRgbaFloat::alphaNormalized() const Returns the alpha channel normalized to values between \c 0.0f and \c 1.0f. \sa alpha() */ /*! \fn template quint8 QRgbaFloat::red8() const Returns the red color component as an 8-bit. */ /*! \fn template quint8 QRgbaFloat::green8() const Returns the green color component as an 8-bit. */ /*! \fn template quint8 QRgbaFloat::blue8() const Returns the blue color component as an 8-bit. */ /*! \fn template quint8 QRgbaFloat::alpha8() const Returns the alpha channel as an 8-bit. */ /*! \fn template uint QRgbaFloat::toArgb32() const Returns the color as a 32-bit ARGB value. \sa fromArgb32() */ /*! \fn template quint16 QRgbaFloat::red16() const Returns the red color component as a 16-bit integer. */ /*! \fn template quint16 QRgbaFloat::green16() const Returns the green color component as a 16-bit integer. */ /*! \fn template quint16 QRgbaFloat::blue16() const Returns the blue color component as a 16-bit integer. */ /*! \fn template quint16 QRgbaFloat::alpha16() const Returns the alpha channel as a 16-bit integer. */ /*! \fn template QRgbaFloat QRgbaFloat::premultiplied() const Returns the color with the alpha premultiplied. \sa unpremultiplied() */ /*! \fn template QRgbaFloat QRgbaFloat::unpremultiplied() const Returns the color with the alpha unpremultiplied. \sa premultiplied() */