1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:FDL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Free Documentation License Usage
18** Alternatively, this file may be used under the terms of the GNU Free
19** Documentation License version 1.3 as published by the Free Software
20** Foundation and appearing in the file included in the packaging of
21** this file. Please review the following information to ensure
22** the GNU Free Documentation License version 1.3 requirements
23** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
24** $QT_END_LICENSE$
25**
26****************************************************************************/
27
28/*!
29    \class QRgba64
30    \brief The QRgba64 struct contains a 64-bit RGB color.
31    \since 5.6
32
33    \ingroup painting
34    \inmodule QtGui
35
36    QRgba64 is a 64-bit data-structure containing four 16-bit color channels: Red, green, blue and alpha.
37
38    QRgba64 can be used as a replacement for QRgb when higher precision is needed. In particular a
39    premultiplied QRgba64 can operate on unpremultiplied QRgb without loss of precision except
40    for alpha 0.
41
42    \sa QRgb, QColor
43*/
44
45/*!
46    \fn QRgba64 QRgba64::operator=(quint64 rgba)
47
48    Assigns the value \a rgba to this instance of QRgba64 and returns it.
49*/
50
51/*!
52    \fn static QRgba64 QRgba64::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
53
54    Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
55
56    \sa fromRgba()
57*/
58
59/*!
60    \fn static QRgba64 QRgba64::fromRgba64(quint64 c)
61
62    Returns \a c as a QRgba64 struct.
63
64    \sa fromArgb32()
65*/
66
67/*!
68    \fn static QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
69
70    Constructs a QRgba64 value from the four 8-bit color channels \a red, \a green, \a blue and \a alpha.
71
72    \sa fromArgb32()
73*/
74
75/*!
76    \fn static QRgba64 QRgba64::fromArgb32(uint rgb)
77
78    Constructs a QRgba64 value from the 32bit ARGB value \a rgb.
79
80    \sa fromRgba()
81*/
82
83/*!
84    \fn bool QRgba64::isOpaque() const
85
86    Returns whether the color is fully opaque.
87
88    \sa isTransparent(), alpha()
89*/
90
91/*!
92    \fn bool QRgba64::isTransparent() const
93
94    Returns whether the color is transparent.
95
96    \sa isOpaque(), alpha()
97*/
98
99/*!
100    \fn quint16 QRgba64::red() const
101
102    Returns the 16-bit red color component.
103
104    \sa setRed()
105*/
106
107/*!
108    \fn void QRgba64::setRed(quint16 red)
109
110    Sets the red color component of this color to \a red.
111
112    \sa red()
113*/
114
115/*!
116    \fn quint16 QRgba64::green() const
117
118    Returns the 16-bit green color component.
119
120    \sa setGreen()
121*/
122
123/*!
124    \fn void QRgba64::setGreen(quint16 green)
125
126    Sets the green color component of this color to \a green.
127
128    \sa green()
129*/
130
131/*!
132    \fn quint16 QRgba64::blue() const
133
134    Returns the 16-bit blue color component.
135
136    \sa setBlue()
137*/
138
139/*!
140    \fn void QRgba64::setBlue(quint16 blue)
141
142    Sets the blue color component of this color to \a blue.
143
144    \sa blue()
145*/
146
147/*!
148    \fn quint16 QRgba64::alpha() const
149
150    Returns the 16-bit alpha channel.
151
152    \sa setAlpha()
153*/
154
155/*!
156    \fn void QRgba64::setAlpha(quint16 alpha)
157
158    Sets the alpha of this color to \a alpha.
159
160    \sa alpha()
161*/
162
163/*!
164    \fn quint8 QRgba64::red8() const
165
166    Returns the red color component as an 8-bit.
167*/
168
169/*!
170    \fn quint8 QRgba64::green8() const
171
172    Returns the green color component as an 8-bit.
173*/
174
175/*!
176    \fn quint8 QRgba64::blue8() const
177
178    Returns the blue color component as an 8-bit.
179*/
180
181/*!
182    \fn quint8 QRgba64::alpha8() const
183
184    Returns the alpha channel as an 8-bit.
185*/
186
187/*!
188    \fn uint QRgba64::toArgb32() const
189
190    Returns the color as a 32-bit ARGB value.
191
192    \sa fromArgb32()
193*/
194
195/*!
196    \fn ushort QRgba64::toRgb16() const
197
198    Returns the color as a 16-bit RGB value.
199
200    \sa toArgb32()
201*/
202
203/*!
204    \fn QRgba64 QRgba64::premultiplied() const
205
206    Returns the color with the alpha premultiplied.
207
208    \sa unpremultiplied()
209*/
210
211/*!
212    \fn QRgba64 QRgba64::unpremultiplied() const
213
214    Returns the color with the alpha unpremultiplied.
215
216    \sa premultiplied()
217*/
218
219/*!
220    \fn QRgba64::operator quint64() const
221
222    Returns the color as a 64bit unsigned integer
223*/
224
225/*!
226    \fn QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
227    \relates QColor
228    \since 5.6
229
230    Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
231
232    \sa qRgba()
233*/
234
235/*!
236    \fn QRgba64 qRgba64(quint64 c)
237    \relates QColor
238    \since 5.6
239
240    Returns \a c as a QRgba64 struct.
241
242    \sa qRgba()
243*/
244
245/*!
246    \fn QRgba64 qPremultiply(QRgba64 rgba64)
247    \since 5.6
248    \relates QColor
249
250    Converts an unpremultiplied QRgba64 quadruplet \a rgba64 into a premultiplied QRgba64 quadruplet.
251
252    \sa QRgba64::premultiplied(), qUnpremultiply()
253*/
254
255/*!
256    \fn QRgba64 qUnpremultiply(QRgba64 rgba64)
257    \since 5.6
258    \relates QColor
259
260    Converts a premultiplied QRgba64 quadruplet \a rgba64 into an unpremultiplied QRgba64 quadruplet.
261
262    \sa QRgba64::unpremultiplied(), qPremultiply()
263*/
264
265/*!
266    \fn uint qRed(QRgba64 rgba64)
267    \since 5.6
268    \relates QColor
269
270    Returns the red component of \a rgba64 as an 8-bit value.
271
272    \sa QRgba64::red8(), QColor::red()
273*/
274
275/*!
276    \fn uint qGreen(QRgba64 rgba64)
277    \since 5.6
278    \relates QColor
279
280    Returns the green component of \a rgba64 as an 8-bit value.
281
282    \sa QRgba64::green8(), QColor::green()
283*/
284
285/*!
286    \fn uint qBlue(QRgba64 rgba64)
287    \since 5.6
288    \relates QColor
289
290    Returns the blue component of \a rgba64 as an 8-bit value.
291
292    \sa QRgba64::blue8(), QColor::blue()
293*/
294
295/*!
296    \fn uint qAlpha(QRgba64 rgba64)
297    \since 5.6
298    \relates QColor
299
300    Returns the alpha component of \a rgba64 as an 8-bit value.
301
302    \sa QRgba64::alpha8(), QColor::alpha()
303*/
304