In questa pagina

QRgba64 Class

La struttura QRgba64 contiene un colore RGB a 64 bit. Per saperne di più...

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

Funzioni pubbliche

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)

Membri pubblici statici

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)

Descrizione dettagliata

QRgba64 è una struttura dati a 64 bit contenente quattro canali di colore a 16 bit: rosso, verde, blu e alfa.

QRgba64 può essere utilizzato in sostituzione di QRgb quando è necessaria una maggiore precisione. In particolare, un QRgba64 premoltiplicato può operare su un QRgb non premoltiplicato senza perdita di precisione, tranne nel caso in cui l'alfa sia pari a 0.

Vedi anche QRgb e QColor.

Documentazione sulle funzioni membro

[constexpr noexcept default] QRgba64::QRgba64()

Crea un'istanza di ` QRgba64` con i valori predefiniti.

[constexpr] quint8 QRgba64::alpha8() const

Restituisce il canale alfa come valore a 8 bit.

[constexpr] quint16 QRgba64::alpha() const

Restituisce il canale alfa a 16 bit.

Vedi anche setAlpha().

[constexpr] quint8 QRgba64::blue8() const

Restituisce la componente di colore blu come valore a 8 bit.

[constexpr] quint16 QRgba64::blue() const

Restituisce la componente di colore blu a 16 bit.

Vedi anche setBlue().

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

Crea un valore di tipo “ QRgba64 ” a partire dal valore ARGB a 32 bit rgb.

Vedi anche fromRgba().

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

Restituisce c come struttura QRgba64.

Vedi anche fromArgb32().

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

Restituisce il quartetto QRgba64 (r, g, b, a).

Vedi anche fromRgba().

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

Crea un valore di tipo “ QRgba64 ” a partire dai quattro canali di colore a 8 bit: red, green, blue e alpha.

Vedi anche fromArgb32().

[constexpr] quint8 QRgba64::green8() const

Restituisce la componente di colore verde come valore a 8 bit.

[constexpr] quint16 QRgba64::green() const

Restituisce la componente di colore verde a 16 bit.

Vedi anche setGreen().

[constexpr] bool QRgba64::isOpaque() const

Restituisce se il colore è completamente opaco.

Vedi anche isTransparent() e alpha().

[constexpr] bool QRgba64::isTransparent() const

Restituisce se il colore è trasparente.

Vedi anche isOpaque() e alpha().

[constexpr] QRgba64 QRgba64::premultiplied() const

Restituisce il colore con l'alfa premoltiplicato.

Vedi anche unpremultiplied().

[constexpr] quint8 QRgba64::red8() const

Restituisce la componente di colore rossa come valore a 8 bit.

[constexpr] quint16 QRgba64::red() const

Restituisce la componente di colore rosso a 16 bit.

Vedi anche setRed().

void QRgba64::setAlpha(quint16 alpha)

Imposta la trasparenza (alfa) di questo colore su alpha.

Vedi anche alpha().

void QRgba64::setBlue(quint16 blue)

Imposta la componente blu di questo colore su blue.

Vedi anche blue().

void QRgba64::setGreen(quint16 green)

Imposta la componente verde di questo colore su green.

Vedi anche green().

void QRgba64::setRed(quint16 red)

Imposta la componente rossa di questo colore su red.

Vedi anche red().

[constexpr] uint QRgba64::toArgb32() const

Restituisce il colore come valore ARGB a 32 bit.

Vedi anche fromArgb32().

[constexpr] ushort QRgba64::toRgb16() const

Restituisce il colore come valore RGB a 16 bit.

Vedi anche toArgb32().

[constexpr] QRgba64 QRgba64::unpremultiplied() const

Restituisce il colore con l'alfa non premoltiplicato.

Vedi anche premultiplied().

[constexpr] QRgba64::operator quint64() const

Restituisce il colore come numero intero senza segno a 64 bit

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

Assegna il valore “ rgba ” a questa istanza di ` QRgba64 ` e lo restituisce.

Elementi correlati non membri

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

Restituisce il valore hash per ` key`, utilizzando ` seed ` come seme per il calcolo.

Nelle versioni di Qt precedenti alla 6.11.1, il tipo era hashable tramite la sua conversione implicita in quint64. Questo sovraccarico esplicito di qHash() mantiene la compatibilità con quel qHash() implicito.

Questa funzione è stata introdotta in Qt 6.11.1.

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