The QRgbaFloat struct contains a four part RGBA floating-point color. More...
| Header: | #include <QRgbaFloat> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Since: | Qt 6.2 |
| quint8 | alpha8() const |
| quint16 | alpha16() const |
| float | alpha() const |
| float | alphaNormalized() const |
| quint8 | blue8() const |
| quint16 | blue16() const |
| float | blue() const |
| float | blueNormalized() const |
| quint8 | green8() const |
| quint16 | green16() const |
| float | green() const |
| float | greenNormalized() const |
| bool | isOpaque() const |
| bool | isTransparent() const |
| QRgbaFloat<T> | premultiplied() const |
| quint8 | red8() const |
| quint16 | red16() const |
| float | red() const |
| float | redNormalized() const |
| void | setAlpha(float alpha) |
| void | setBlue(float blue) |
| void | setGreen(float green) |
| void | setRed(float red) |
| uint | toArgb32() const |
| QRgbaFloat<T> | unpremultiplied() const |
| QRgbaFloat<T> | fromArgb32(uint rgb) |
| QRgbaFloat<T> | fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha) |
| QRgbaFloat<T> | fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha) |
See also QRgb, QRgba64, and QColor.
[alias] QRgbaFloat::FastTypeAlias for float.
[constexpr] quint8 QRgbaFloat::alpha8() constReturns the alpha channel as an 8-bit.
[constexpr] quint16 QRgbaFloat::alpha16() constReturns the alpha channel as a 16-bit integer.
[constexpr] float QRgbaFloat::alpha() constReturns the alpha channel.
See also setAlpha().
[constexpr] float QRgbaFloat::alphaNormalized() constReturns the alpha channel normalized to values between 0.0f and 1.0f.
See also alpha().
[constexpr] quint8 QRgbaFloat::blue8()
constReturns the blue color component as an 8-bit.
[constexpr] quint16 QRgbaFloat::blue16() constReturns the blue color component as a 16-bit integer.
[constexpr] float QRgbaFloat::blue() constReturns the blue color component.
See also setBlue().
[constexpr] float QRgbaFloat::blueNormalized() constReturns the blue color component normalized to values between 0.0f and 1.0f.
See also setBlue().
[static constexpr] QRgbaFloat<T>
QRgbaFloat::fromArgb32(uint rgb)Constructs a QRgbaFloat value from the 32bit ARGB value rgb.
See also fromRgba() and toArgb32().
[static constexpr] QRgbaFloat<T>
QRgbaFloat::fromRgba64(quint16 red, quint16
green, quint16 blue, quint16 alpha)Constructs a QRgbaFloat value from the four 16-bit integer color channels red, green, blue and alpha.
See also fromRgba().
[static constexpr] QRgbaFloat<T>
QRgbaFloat::fromRgba(quint8 red, quint8
green, quint8 blue, quint8 alpha)Constructs a QRgbaFloat value from the four 8-bit color channels red, green, blue and alpha.
See also fromArgb32().
[constexpr] quint8 QRgbaFloat::green8() constReturns the green color component as an 8-bit.
[constexpr] quint16 QRgbaFloat::green16() constReturns the green color component as a 16-bit integer.
[constexpr] float QRgbaFloat::green() constReturns the green color component.
See also setGreen().
[constexpr] float QRgbaFloat::greenNormalized() constReturns the green color component normalized to values between 0.0f and 1.0f.
See also setGreen().
[constexpr] bool QRgbaFloat::isOpaque() constReturns whether the color is fully opaque.
See also isTransparent() and alpha().
[constexpr] bool QRgbaFloat::isTransparent() constReturns whether the color is fully transparent.
See also isOpaque() and alpha().
[constexpr] QRgbaFloat<T>
QRgbaFloat::premultiplied() constReturns the color with the alpha premultiplied.
See also unpremultiplied().
[constexpr] quint8 QRgbaFloat::red8()
constReturns the red color component as an 8-bit.
[constexpr] quint16 QRgbaFloat::red16() constReturns the red color component as a 16-bit integer.
[constexpr] float QRgbaFloat::red() constReturns the red color component.
See also setRed().
[constexpr] float QRgbaFloat::redNormalized() constReturns the red color component normalized to values between 0.0f and 1.0f.
See also setRed().
Sets the alpha of this color to alpha.
See also alpha().
Sets the blue color component of this color to blue.
See also blue().
Sets the green color component of this color to green.
See also green().
Sets the red color component of this color to red.
See also red().
[constexpr] uint QRgbaFloat::toArgb32() constReturns the color as a 32-bit ARGB value.
See also fromArgb32().
[constexpr] QRgbaFloat<T>
QRgbaFloat::unpremultiplied() constReturns the color with the alpha unpremultiplied.
See also premultiplied().
A 64-bit data-structure containing four 16-bit floating point color channels: Red, green, blue and alpha.
A 128-bit data-structure containing four 32-bit floating point color channels: Red, green, blue and alpha.