1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
6 \brief The QRgba64 struct contains a 64-bit RGB color.
12 QRgba64 is a 64-bit data-structure containing four 16-bit color channels: Red, green, blue and alpha.
14 QRgba64 can be used as a replacement for QRgb when higher precision is needed. In particular a
15 premultiplied QRgba64 can operate on unpremultiplied QRgb without loss of precision except
22 \fn QRgba64 QRgba64::operator=(quint64 rgba)
24 Assigns the value \a rgba to this instance of QRgba64 and returns it.
28 \fn static QRgba64 QRgba64::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
30 Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
36 \fn static QRgba64 QRgba64::fromRgba64(quint64 c)
38 Returns \a c as a QRgba64 struct.
44 \fn static QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
46 Constructs a QRgba64 value from the four 8-bit color channels \a red, \a green, \a blue and \a alpha.
52 \fn static QRgba64 QRgba64::fromArgb32(uint rgb)
54 Constructs a QRgba64 value from the 32bit ARGB value \a rgb.
60 \fn bool QRgba64::isOpaque() const
62 Returns whether the color is fully opaque.
64 \sa isTransparent(), alpha()
68 \fn bool QRgba64::isTransparent() const
70 Returns whether the color is transparent.
72 \sa isOpaque(), alpha()
76 \fn quint16 QRgba64::red() const
78 Returns the 16-bit red color component.
84 \fn void QRgba64::setRed(quint16 red)
86 Sets the red color component of this color to \a red.
92 \fn quint16 QRgba64::green() const
94 Returns the 16-bit green color component.
100 \fn void QRgba64::setGreen(quint16 green)
102 Sets the green color component of this color to \a green.
108 \fn quint16 QRgba64::blue() const
110 Returns the 16-bit blue color component.
116 \fn void QRgba64::setBlue(quint16 blue)
118 Sets the blue color component of this color to \a blue.
124 \fn quint16 QRgba64::alpha() const
126 Returns the 16-bit alpha channel.
132 \fn void QRgba64::setAlpha(quint16 alpha)
134 Sets the alpha of this color to \a alpha.
140 \fn quint8 QRgba64::red8() const
142 Returns the red color component as an 8-bit.
146 \fn quint8 QRgba64::green8() const
148 Returns the green color component as an 8-bit.
152 \fn quint8 QRgba64::blue8() const
154 Returns the blue color component as an 8-bit.
158 \fn quint8 QRgba64::alpha8() const
160 Returns the alpha channel as an 8-bit.
164 \fn uint QRgba64::toArgb32() const
166 Returns the color as a 32-bit ARGB value.
172 \fn ushort QRgba64::toRgb16() const
174 Returns the color as a 16-bit RGB value.
180 \fn QRgba64 QRgba64::premultiplied() const
182 Returns the color with the alpha premultiplied.
184 \sa unpremultiplied()
188 \fn QRgba64 QRgba64::unpremultiplied() const
190 Returns the color with the alpha unpremultiplied.
196 \fn QRgba64::operator quint64() const
198 Returns the color as a 64bit unsigned integer
202 \fn QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
206 Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
212 \fn QRgba64 qRgba64(quint64 c)
216 Returns \a c as a QRgba64 struct.
222 \fn QRgba64 qPremultiply(QRgba64 rgba64)
226 Converts an unpremultiplied QRgba64 quadruplet \a rgba64 into a premultiplied QRgba64 quadruplet.
228 \sa QRgba64::premultiplied(), qUnpremultiply()
232 \fn QRgba64 qUnpremultiply(QRgba64 rgba64)
236 Converts a premultiplied QRgba64 quadruplet \a rgba64 into an unpremultiplied QRgba64 quadruplet.
238 \sa QRgba64::unpremultiplied(), qPremultiply()
242 \fn uint qRed(QRgba64 rgba64)
246 Returns the red component of \a rgba64 as an 8-bit value.
248 \sa QRgba64::red8(), QColor::red()
252 \fn uint qGreen(QRgba64 rgba64)
256 Returns the green component of \a rgba64 as an 8-bit value.
258 \sa QRgba64::green8(), QColor::green()
262 \fn uint qBlue(QRgba64 rgba64)
266 Returns the blue component of \a rgba64 as an 8-bit value.
268 \sa QRgba64::blue8(), QColor::blue()
272 \fn uint qAlpha(QRgba64 rgba64)
276 Returns the alpha component of \a rgba64 as an 8-bit value.
278 \sa QRgba64::alpha8(), QColor::alpha()