QRgbaFloat Class
template <typename F> class QRgbaFloatDie Struktur „QRgbaFloat“ enthält einen vierteiligen RGBA-Farbwert im Gleitkommaformat. Mehr...
| Header: | #include <QRgbaFloat> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Seit: | Qt 6.2 |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QRgbaFloat ist Teil der Mal-Klassen.
Öffentliche Typen
Öffentliche Funktionen
| 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 |
Statische öffentliche Mitglieder
| 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) |
Verwandte Nicht-Mitglieder
Ausführliche Beschreibung
QRgbaFloat ist eine Template-Klasse, bei der F den für die Farbkomponenten verwendeten Gleitkomma-Typ angibt. Qt stellt zwei Typ-Aliase bereit: QRgbaFloat16 mit 16-Bit-Gleitkommazahlen halber Genauigkeit und QRgbaFloat32 mit 32-Bit-Gleitkommazahlen einfacher Genauigkeit.
Siehe auch QRgb, QRgba64 und QColor.
Dokumentation zu Member-Funktionen
[constexpr] quint8 QRgbaFloat::alpha8() const
Gibt den Alphakanal als 8-Bit-Wert zurück.
[constexpr] quint16 QRgbaFloat::alpha16() const
Gibt den Alphakanal als 16-Bit-Ganzzahl zurück.
[constexpr] float QRgbaFloat::alpha() const
Gibt den Alphakanal zurück.
Siehe auch ` setAlpha()`.
[constexpr] float QRgbaFloat::alphaNormalized() const
Gibt den Alphakanal zurück, der auf Werte zwischen 0.0f und 1.0f normiert ist.
Siehe auch alpha().
[constexpr] quint8 QRgbaFloat::blue8() const
Gibt die blaue Farbkomponente als 8-Bit-Wert zurück.
[constexpr] quint16 QRgbaFloat::blue16() const
Gibt die blaue Farbkomponente als 16-Bit-Ganzzahl zurück.
[constexpr] float QRgbaFloat::blue() const
Gibt die blaue Farbkomponente zurück.
Siehe auch „ setBlue()“.
[constexpr] float QRgbaFloat::blueNormalized() const
Gibt die Blau-Farbkomponente zurück, normiert auf Werte zwischen 0.0f und 1.0f.
Siehe auch setBlue().
[static constexpr] QRgbaFloat<T> QRgbaFloat::fromArgb32(uint rgb)
Erzeugt einen Wert vom Typ „ QRgbaFloat “ aus dem 32-Bit-ARGB-Wert „ rgb “.
Siehe auch fromRgba() und toArgb32().
[static constexpr] QRgbaFloat<T> QRgbaFloat::fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha)
Erzeugt einen Wert vom Typ „ QRgbaFloat “ aus den vier 16-Bit-Ganzzahl-Farbkanälen „ red “, „ green “, „ blue “ und „ alpha “.
Siehe auch fromRgba().
[static constexpr] QRgbaFloat<T> QRgbaFloat::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
Erzeugt einen Wert vom Typ „ QRgbaFloat “ aus den vier 8-Bit-Farbkanälen red, green, blue und alpha.
Siehe auch fromArgb32().
[constexpr] quint8 QRgbaFloat::green8() const
Gibt die grüne Farbkomponente als 8-Bit-Wert zurück.
[constexpr] quint16 QRgbaFloat::green16() const
Gibt die grüne Farbkomponente als 16-Bit-Ganzzahl zurück.
[constexpr] float QRgbaFloat::green() const
Gibt die grüne Farbkomponente zurück.
Siehe auch „ setGreen()“.
[constexpr] float QRgbaFloat::greenNormalized() const
Gibt die grüne Farbkomponente zurück, normiert auf Werte zwischen 0.0f und 1.0f.
Siehe auch setGreen().
[constexpr] bool QRgbaFloat::isOpaque() const
Gibt zurück, ob die Farbe vollständig deckend ist.
Siehe auch „ isTransparent()“ und „ alpha()“.
[constexpr] bool QRgbaFloat::isTransparent() const
Gibt zurück, ob die Farbe vollständig transparent ist.
Siehe auch „ isOpaque()“ und „ alpha()“.
[constexpr] QRgbaFloat<T> QRgbaFloat::premultiplied() const
Gibt die Farbe mit vorvervielfachtem Alpha-Wert zurück.
Siehe auch „ unpremultiplied()“.
[constexpr] quint8 QRgbaFloat::red8() const
Gibt die rote Farbkomponente als 8-Bit-Wert zurück.
[constexpr] quint16 QRgbaFloat::red16() const
Gibt die rote Farbkomponente als 16-Bit-Ganzzahl zurück.
[constexpr] float QRgbaFloat::red() const
Gibt die rote Farbkomponente zurück.
Siehe auch „ setRed()“.
[constexpr] float QRgbaFloat::redNormalized() const
Gibt die rote Farbkomponente zurück, normiert auf Werte zwischen 0.0f und 1.0f.
Siehe auch setRed().
void QRgbaFloat::setAlpha(float alpha)
Setzt die Deckkraft dieser Farbe auf alpha.
Siehe auch alpha().
void QRgbaFloat::setBlue(float blue)
Setzt die blaue Farbkomponente dieser Farbe auf „ blue “.
Siehe auch blue().
void QRgbaFloat::setGreen(float green)
Setzt die grüne Farbkomponente dieser Farbe auf „ green “.
Siehe auch green().
void QRgbaFloat::setRed(float red)
Setzt die rote Farbkomponente dieser Farbe auf red.
Siehe auch red().
[constexpr] uint QRgbaFloat::toArgb32() const
Gibt die Farbe als 32-Bit-ARGB-Wert zurück.
Siehe auch „ fromArgb32()“.
[constexpr] QRgbaFloat<T> QRgbaFloat::unpremultiplied() const
Gibt die Farbe zurück, wobei der Alpha-Wert nicht vorvervielfacht ist.
Siehe auch „ premultiplied()“.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.