QRgba64 Class
QRgba64 结构包含 64 位 RGB 颜色。更多
头文件: | #include <QRgba64> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
- 所有成员(包括继承成员)列表
- 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 |
quint64 | operator quint64() const |
QRgba64 & | operator=(quint64 rgba) |
静态公共成员
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) |
详细描述
QRgba64 是一个 64 位数据结构,包含四个 16 位颜色通道:红色、绿色、蓝色和 alpha。
当需要更高精度时,QRgba64 可用于替代QRgb 。特别是,预乘法 QRgba64 可以对未乘法QRgb 进行操作,而不会损失精度(alpha 0 除外)。
成员函数文档
[constexpr]
quint8 QRgba64::alpha8() const
返回 8 位的 alpha 通道。
[constexpr]
quint16 QRgba64::alpha() const
返回 16 位 alpha 通道。
另请参见 setAlpha()。
[constexpr]
quint8 QRgba64::blue8() const
返回 8 位的蓝色分量。
[constexpr]
quint16 QRgba64::blue() const
返回 16 位蓝色分量。
另请参见 setBlue()。
[static constexpr]
QRgba64 QRgba64::fromArgb32(uint rgb)
根据 32 位 ARGB 值构建QRgba64 值rgb 。
另请参见 fromRgba()。
[static constexpr]
QRgba64 QRgba64::fromRgba64(quint64 c)
以QRgba64 结构形式返回c 。
另请参见 fromArgb32().
[static constexpr]
QRgba64 QRgba64::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
返回QRgba64 四元组(r,g,b,a )。
另请参见 fromRgba().
[static constexpr]
QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
从四个 8 位色彩通道red,green,blue 和alpha 构建QRgba64 值。
另请参阅 fromArgb32() 。
[constexpr]
quint8 QRgba64::green8() const
返回 8 位的绿色分量。
[constexpr]
quint16 QRgba64::green() const
返回 16 位绿色分量。
另请参见 setGreen()。
[constexpr]
bool QRgba64::isOpaque() const
返回颜色是否完全不透明。
另请参阅 isTransparent() 和alpha()。
[constexpr]
bool QRgba64::isTransparent() const
返回颜色是否透明。
[constexpr]
QRgba64 QRgba64::premultiplied() const
返回预先乘以 alpha 的颜色。
另请参阅 unpremultiplied()。
[constexpr]
quint8 QRgba64::red8() const
返回 8 位的红色分量。
[constexpr]
quint16 QRgba64::red() const
返回 16 位红色分量。
另请参见 setRed()。
void QRgba64::setAlpha(quint16 alpha)
将此颜色的 alpha 设置为alpha 。
另请参阅 alpha() 。
void QRgba64::setBlue(quint16 blue)
将此颜色的蓝色分量设置为blue 。
另请参见 blue()。
void QRgba64::setGreen(quint16 green)
将此颜色的绿色分量设置为green 。
另请参见 green()。
void QRgba64::setRed(quint16 red)
将此颜色的红色分量设置为red 。
另请参见 red()。
[constexpr]
uint QRgba64::toArgb32() const
以 32 位 ARGB 值返回颜色。
另请参见 fromArgb32()。
[constexpr]
ushort QRgba64::toRgb16() const
以 16 位 RGB 值返回颜色。
另请参见 toArgb32()。
[constexpr]
QRgba64 QRgba64::unpremultiplied() const
返回未乘以 alpha 值的颜色。
另请参见 premultiplied()。
[constexpr]
quint64 QRgba64::operator quint64() const
返回颜色的 64 位无符号整数
[noexcept]
QRgba64 &QRgba64::operator=(quint64 rgba)
为QRgba64 的此实例赋值rgba 并返回。
© 2025 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.