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
qrgbafloat.qdoc
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \class QRgbaFloat
6 \brief The QRgbaFloat struct contains a four part RGBA floating-point color.
7 \since 6.2
8
9 \ingroup painting
10 \inmodule QtGui
11
12 \sa QRgb, QRgba64, QColor
13*/
14
15/*!
16 \typealias QRgbaFloat::FastType
17
18 Alias for \e float.
19*/
20
21/*!
22 \typedef QRgbaFloat16
23 \relates QRgbaFloat
24
25 A 64-bit data-structure containing four 16-bit floating point color channels: Red, green, blue and alpha.
26*/
27
28/*!
29 \typedef QRgbaFloat32
30 \relates QRgbaFloat
31
32 A 128-bit data-structure containing four 32-bit floating point color channels: Red, green, blue and alpha.
33*/
34
35/*!
36 \fn template<typename F> QRgbaFloat QRgbaFloat<F>::fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha)
37
38 Constructs a QRgbaFloat value from the four 16-bit integer color channels \a red, \a green, \a blue and \a alpha.
39
40 \sa fromRgba()
41*/
42
43/*!
44 \fn template<typename F> QRgbaFloat QRgbaFloat<F>::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
45
46 Constructs a QRgbaFloat 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 template<typename F> QRgbaFloat QRgbaFloat<F>::fromArgb32(uint rgb)
53
54 Constructs a QRgbaFloat value from the 32bit ARGB value \a rgb.
55
56 \sa fromRgba(), toArgb32()
57*/
58
59/*!
60 \fn template<typename F> bool QRgbaFloat<F>::isOpaque() const
61
62 Returns whether the color is fully opaque.
63
64 \sa isTransparent(), alpha()
65*/
66
67/*!
68 \fn template<typename F> bool QRgbaFloat<F>::isTransparent() const
69
70 Returns whether the color is fully transparent.
71
72 \sa isOpaque(), alpha()
73*/
74
75/*!
76 \fn template<typename F> float QRgbaFloat<F>::red() const
77
78 Returns the red color component.
79
80 \sa setRed()
81*/
82
83/*!
84 \fn template<typename F> void QRgbaFloat<F>::setRed(float red)
85
86 Sets the red color component of this color to \a red.
87
88 \sa red()
89*/
90
91/*!
92 \fn template<typename F> float QRgbaFloat<F>::green() const
93
94 Returns the green color component.
95
96 \sa setGreen()
97*/
98
99/*!
100 \fn template<typename F> void QRgbaFloat<F>::setGreen(float green)
101
102 Sets the green color component of this color to \a green.
103
104 \sa green()
105*/
106
107/*!
108 \fn template<typename F> float QRgbaFloat<F>::blue() const
109
110 Returns the blue color component.
111
112 \sa setBlue()
113*/
114
115/*!
116 \fn template<typename F> void QRgbaFloat<F>::setBlue(float blue)
117
118 Sets the blue color component of this color to \a blue.
119
120 \sa blue()
121*/
122
123/*!
124 \fn template<typename F> float QRgbaFloat<F>::alpha() const
125
126 Returns the alpha channel.
127
128 \sa setAlpha()
129*/
130
131/*!
132 \fn template<typename F> void QRgbaFloat<F>::setAlpha(float alpha)
133
134 Sets the alpha of this color to \a alpha.
135
136 \sa alpha()
137*/
138
139/*!
140 \fn template<typename F> float QRgbaFloat<F>::redNormalized() const
141
142 Returns the red color component normalized to values between \c 0.0f and \c 1.0f.
143
144 \sa setRed()
145*/
146
147/*!
148 \fn template<typename F> float QRgbaFloat<F>::greenNormalized() const
149
150 Returns the green color component normalized to values between \c 0.0f and \c 1.0f.
151
152 \sa setGreen()
153*/
154
155/*!
156 \fn template<typename F> float QRgbaFloat<F>::blueNormalized() const
157
158 Returns the blue color component normalized to values between \c 0.0f and \c 1.0f.
159
160 \sa setBlue()
161*/
162
163/*!
164 \fn template<typename F> float QRgbaFloat<F>::alphaNormalized() const
165
166 Returns the alpha channel normalized to values between \c 0.0f and \c 1.0f.
167
168 \sa alpha()
169*/
170
171/*!
172 \fn template<typename F> quint8 QRgbaFloat<F>::red8() const
173
174 Returns the red color component as an 8-bit.
175*/
176
177/*!
178 \fn template<typename F> quint8 QRgbaFloat<F>::green8() const
179
180 Returns the green color component as an 8-bit.
181*/
182
183/*!
184 \fn template<typename F> quint8 QRgbaFloat<F>::blue8() const
185
186 Returns the blue color component as an 8-bit.
187*/
188
189/*!
190 \fn template<typename F> quint8 QRgbaFloat<F>::alpha8() const
191
192 Returns the alpha channel as an 8-bit.
193*/
194
195/*!
196 \fn template<typename F> uint QRgbaFloat<F>::toArgb32() const
197
198 Returns the color as a 32-bit ARGB value.
199
200 \sa fromArgb32()
201*/
202
203/*!
204 \fn template<typename F> quint16 QRgbaFloat<F>::red16() const
205
206 Returns the red color component as a 16-bit integer.
207*/
208
209/*!
210 \fn template<typename F> quint16 QRgbaFloat<F>::green16() const
211
212 Returns the green color component as a 16-bit integer.
213*/
214
215/*!
216 \fn template<typename F> quint16 QRgbaFloat<F>::blue16() const
217
218 Returns the blue color component as a 16-bit integer.
219*/
220
221/*!
222 \fn template<typename F> quint16 QRgbaFloat<F>::alpha16() const
223
224 Returns the alpha channel as a 16-bit integer.
225*/
226
227/*!
228 \fn template<typename F> QRgbaFloat QRgbaFloat<F>::premultiplied() const
229
230 Returns the color with the alpha premultiplied.
231
232 \sa unpremultiplied()
233*/
234
235/*!
236 \fn template<typename F> QRgbaFloat QRgbaFloat<F>::unpremultiplied() const
237
238 Returns the color with the alpha unpremultiplied.
239
240 \sa premultiplied()
241*/