Auf dieser Seite

QRgba64 Class

Die Struktur „QRgba64“ enthält eine 64-Bit-RGB-Farbe. Mehr...

Header: #include <QRgba64>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

Öffentliche Funktionen

QRgba64()
quint8 alpha8() const
quint16 alpha() const
quint8 blue8() const
quint16 blue() const
quint8 green8() const
quint16 green() const
bool isOpaque() const
bool isTransparent() const
QRgba64 premultiplied() const
quint8 red8() const
quint16 red() const
void setAlpha(quint16 alpha)
void setBlue(quint16 blue)
void setGreen(quint16 green)
void setRed(quint16 red)
uint toArgb32() const
ushort toRgb16() const
QRgba64 unpremultiplied() const
operator quint64() const
QRgba64 &operator=(quint64 rgba)

Statische öffentliche Mitglieder

QRgba64 fromArgb32(uint rgb)
QRgba64 fromRgba64(quint64 c)
QRgba64 fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
QRgba64 fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
(since 6.11.1) size_t qHash(QRgba64 key, size_t seed = 0)

Ausführliche Beschreibung

QRgba64 ist eine 64-Bit-Datenstruktur, die vier 16-Bit-Farbkanäle enthält: Rot, Grün, Blau und Alpha.

QRgba64 kann als Ersatz für „ QRgb “ verwendet werden, wenn eine höhere Genauigkeit erforderlich ist. Insbesondere kann ein vormultipliziertes QRgba64 ohne Genauigkeitsverlust auf ein nicht vormultipliziertes „ QRgb “ angewendet werden, außer bei Alpha 0.

Siehe auch „ QRgb “ und „ QColor “.

Dokumentation der Member-Funktionen

[constexpr noexcept default] QRgba64::QRgba64()

Erstellt standardmäßig eine Instanz von „ QRgba64 “.

[constexpr] quint8 QRgba64::alpha8() const

Gibt den Alphakanal als 8-Bit-Wert zurück.

[constexpr] quint16 QRgba64::alpha() const

Gibt den 16-Bit-Alphakanal zurück.

Siehe auch ` setAlpha()`.

[constexpr] quint8 QRgba64::blue8() const

Gibt die blaue Farbkomponente als 8-Bit-Wert zurück.

[constexpr] quint16 QRgba64::blue() const

Gibt die 16-Bit-Blaukomponente zurück.

Siehe auch „ setBlue()“.

[static constexpr] QRgba64 QRgba64::fromArgb32(uint rgb)

Erzeugt einen Wert vom Typ „ QRgba64 “ aus dem 32-Bit-ARGB-Wert „ rgb “.

Siehe auch fromRgba().

[static constexpr] QRgba64 QRgba64::fromRgba64(quint64 c)

Gibt „ c “ als Struktur vom Typ „ QRgba64 “ zurück.

Siehe auch fromArgb32().

[static constexpr] QRgba64 QRgba64::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)

Gibt das Vierer-Tupel „ QRgba64 “ zurück (r, g, b, a).

Siehe auch fromRgba().

[static constexpr] QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)

Erzeugt einen Wert vom Typ „ QRgba64 “ aus den vier 8-Bit-Farbkanälen red, green, blue und alpha.

Siehe auch fromArgb32().

[constexpr] quint8 QRgba64::green8() const

Gibt die grüne Farbkomponente als 8-Bit-Wert zurück.

[constexpr] quint16 QRgba64::green() const

Gibt die 16-Bit-Grünkomponente zurück.

Siehe auch „ setGreen()“.

[constexpr] bool QRgba64::isOpaque() const

Gibt zurück, ob die Farbe vollständig deckend ist.

Siehe auch „ isTransparent()“ und „ alpha()“.

[constexpr] bool QRgba64::isTransparent() const

Gibt zurück, ob die Farbe transparent ist.

Siehe auch „ isOpaque()“ und „ alpha()“.

[constexpr] QRgba64 QRgba64::premultiplied() const

Gibt die Farbe mit vorvervielfachtem Alpha-Wert zurück.

Siehe auch „ unpremultiplied()“.

[constexpr] quint8 QRgba64::red8() const

Gibt die rote Farbkomponente als 8-Bit-Wert zurück.

[constexpr] quint16 QRgba64::red() const

Gibt die 16-Bit-Rotkomponente der Farbe zurück.

Siehe auch ` setRed()`.

void QRgba64::setAlpha(quint16 alpha)

Setzt die Deckkraft dieser Farbe auf alpha.

Siehe auch alpha().

void QRgba64::setBlue(quint16 blue)

Setzt die blaue Farbkomponente dieser Farbe auf „ blue “.

Siehe auch blue().

void QRgba64::setGreen(quint16 green)

Setzt die grüne Farbkomponente dieser Farbe auf green.

Siehe auch green().

void QRgba64::setRed(quint16 red)

Setzt die rote Farbkomponente dieser Farbe auf „ red “.

Siehe auch red().

[constexpr] uint QRgba64::toArgb32() const

Gibt die Farbe als 32-Bit-ARGB-Wert zurück.

Siehe auch „ fromArgb32()“.

[constexpr] ushort QRgba64::toRgb16() const

Gibt die Farbe als 16-Bit-RGB-Wert zurück.

Siehe auch „ toArgb32()“.

[constexpr] QRgba64 QRgba64::unpremultiplied() const

Gibt die Farbe ohne Alpha-Multiplikation zurück.

Siehe auch „ premultiplied()“.

[constexpr] QRgba64::operator quint64() const

Gibt die Farbe als 64-Bit-Ganzzahl ohne Vorzeichen zurück

[noexcept] QRgba64 &QRgba64::operator=(quint64 rgba)

Weist dieser Instanz von „ QRgba64 “ den Wert „ rgba “ zu und gibt ihn zurück.

Verwandte Nicht-Mitglieder

[constexpr noexcept, since 6.11.1] size_t qHash(QRgba64 key, size_t seed = 0)

Gibt den Hash-Wert für ` key` zurück, wobei ` seed ` als Startwert für die Berechnung verwendet wird.

In Qt-Versionen vor 6.11.1 war der Typ durch seine implizite Konvertierung in `quint64` hashbar. Diese explizite Überladung von `qHash()` gewährleistet die Kompatibilität mit dieser impliziten `qHash()`-Implementierung.

Diese Funktion wurde in Qt 6.11.1 eingeführt.

© 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.