Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qrgba64.qdoc
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \class QRgba64
6 \brief The QRgba64 struct contains a 64-bit RGB color.
7 \since 5.6
8
9 \ingroup painting
10 \inmodule QtGui
11
12 QRgba64 is a 64-bit data-structure containing four 16-bit color channels: Red, green, blue and alpha.
13
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
16 for alpha 0.
17
18 \sa QRgb, QColor
19*/
20
21/*!
22 \fn QRgba64 QRgba64::operator=(quint64 rgba)
23
24 Assigns the value \a rgba to this instance of QRgba64 and returns it.
25*/
26
27/*!
28 \fn static QRgba64 QRgba64::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
29
30 Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
31
32 \sa fromRgba()
33*/
34
35/*!
36 \fn static QRgba64 QRgba64::fromRgba64(quint64 c)
37
38 Returns \a c as a QRgba64 struct.
39
40 \sa fromArgb32()
41*/
42
43/*!
44 \fn static QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
45
46 Constructs a QRgba64 value from the four 8-bit color channels \a red, \a green, \a blue and \a alpha.
47
48 \sa fromArgb32()
49*/
50
51/*!
52 \fn static QRgba64 QRgba64::fromArgb32(uint rgb)
53
54 Constructs a QRgba64 value from the 32bit ARGB value \a rgb.
55
56 \sa fromRgba()
57*/
58
59/*!
60 \fn bool QRgba64::isOpaque() const
61
62 Returns whether the color is fully opaque.
63
64 \sa isTransparent(), alpha()
65*/
66
67/*!
68 \fn bool QRgba64::isTransparent() const
69
70 Returns whether the color is transparent.
71
72 \sa isOpaque(), alpha()
73*/
74
75/*!
76 \fn quint16 QRgba64::red() const
77
78 Returns the 16-bit red color component.
79
80 \sa setRed()
81*/
82
83/*!
84 \fn void QRgba64::setRed(quint16 red)
85
86 Sets the red color component of this color to \a red.
87
88 \sa red()
89*/
90
91/*!
92 \fn quint16 QRgba64::green() const
93
94 Returns the 16-bit green color component.
95
96 \sa setGreen()
97*/
98
99/*!
100 \fn void QRgba64::setGreen(quint16 green)
101
102 Sets the green color component of this color to \a green.
103
104 \sa green()
105*/
106
107/*!
108 \fn quint16 QRgba64::blue() const
109
110 Returns the 16-bit blue color component.
111
112 \sa setBlue()
113*/
114
115/*!
116 \fn void QRgba64::setBlue(quint16 blue)
117
118 Sets the blue color component of this color to \a blue.
119
120 \sa blue()
121*/
122
123/*!
124 \fn quint16 QRgba64::alpha() const
125
126 Returns the 16-bit alpha channel.
127
128 \sa setAlpha()
129*/
130
131/*!
132 \fn void QRgba64::setAlpha(quint16 alpha)
133
134 Sets the alpha of this color to \a alpha.
135
136 \sa alpha()
137*/
138
139/*!
140 \fn quint8 QRgba64::red8() const
141
142 Returns the red color component as an 8-bit.
143*/
144
145/*!
146 \fn quint8 QRgba64::green8() const
147
148 Returns the green color component as an 8-bit.
149*/
150
151/*!
152 \fn quint8 QRgba64::blue8() const
153
154 Returns the blue color component as an 8-bit.
155*/
156
157/*!
158 \fn quint8 QRgba64::alpha8() const
159
160 Returns the alpha channel as an 8-bit.
161*/
162
163/*!
164 \fn uint QRgba64::toArgb32() const
165
166 Returns the color as a 32-bit ARGB value.
167
168 \sa fromArgb32()
169*/
170
171/*!
172 \fn ushort QRgba64::toRgb16() const
173
174 Returns the color as a 16-bit RGB value.
175
176 \sa toArgb32()
177*/
178
179/*!
180 \fn QRgba64 QRgba64::premultiplied() const
181
182 Returns the color with the alpha premultiplied.
183
184 \sa unpremultiplied()
185*/
186
187/*!
188 \fn QRgba64 QRgba64::unpremultiplied() const
189
190 Returns the color with the alpha unpremultiplied.
191
192 \sa premultiplied()
193*/
194
195/*!
196 \fn QRgba64::operator quint64() const
197
198 Returns the color as a 64bit unsigned integer
199*/
200
201/*!
202 \fn QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
203 \relates QColor
204 \since 5.6
205
206 Returns the QRgba64 quadruplet (\a{r}, \a{g}, \a{b}, \a{a}).
207
208 \sa qRgba()
209*/
210
211/*!
212 \fn QRgba64 qRgba64(quint64 c)
213 \relates QColor
214 \since 5.6
215
216 Returns \a c as a QRgba64 struct.
217
218 \sa qRgba()
219*/
220
221/*!
222 \fn QRgba64 qPremultiply(QRgba64 rgba64)
223 \since 5.6
224 \relates QColor
225
226 Converts an unpremultiplied QRgba64 quadruplet \a rgba64 into a premultiplied QRgba64 quadruplet.
227
228 \sa QRgba64::premultiplied(), qUnpremultiply()
229*/
230
231/*!
232 \fn QRgba64 qUnpremultiply(QRgba64 rgba64)
233 \since 5.6
234 \relates QColor
235
236 Converts a premultiplied QRgba64 quadruplet \a rgba64 into an unpremultiplied QRgba64 quadruplet.
237
238 \sa QRgba64::unpremultiplied(), qPremultiply()
239*/
240
241/*!
242 \fn uint qRed(QRgba64 rgba64)
243 \since 5.6
244 \relates QColor
245
246 Returns the red component of \a rgba64 as an 8-bit value.
247
248 \sa QRgba64::red8(), QColor::red()
249*/
250
251/*!
252 \fn uint qGreen(QRgba64 rgba64)
253 \since 5.6
254 \relates QColor
255
256 Returns the green component of \a rgba64 as an 8-bit value.
257
258 \sa QRgba64::green8(), QColor::green()
259*/
260
261/*!
262 \fn uint qBlue(QRgba64 rgba64)
263 \since 5.6
264 \relates QColor
265
266 Returns the blue component of \a rgba64 as an 8-bit value.
267
268 \sa QRgba64::blue8(), QColor::blue()
269*/
270
271/*!
272 \fn uint qAlpha(QRgba64 rgba64)
273 \since 5.6
274 \relates QColor
275
276 Returns the alpha component of \a rgba64 as an 8-bit value.
277
278 \sa QRgba64::alpha8(), QColor::alpha()
279*/