QRgbaFloat Class
template <typename F> class QRgbaFloatQRgbaFloat 结构包含四部分 RGBA 浮点颜色。更多
头文件: | #include <QRgbaFloat> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
自 | Qt 6.2 |
- 所有成员的列表,包括继承成员
- QRgbaFloat 属于绘画类。
公共类型
公共函数
quint8 | alpha8() const |
quint16 | alpha16() const |
float | alpha() const |
float | alphaNormalized() const |
quint8 | blue8() const |
quint16 | blue16() const |
float | blue() const |
float | blueNormalized() const |
quint8 | green8() const |
quint16 | green16() const |
float | green() const |
float | greenNormalized() const |
bool | isOpaque() const |
bool | isTransparent() const |
QRgbaFloat<T> | premultiplied() const |
quint8 | red8() const |
quint16 | red16() const |
float | red() const |
float | redNormalized() const |
void | setAlpha(float alpha) |
void | setBlue(float blue) |
void | setGreen(float green) |
void | setRed(float red) |
uint | toArgb32() const |
QRgbaFloat<T> | unpremultiplied() const |
静态公共成员
QRgbaFloat<T> | fromArgb32(uint rgb) |
QRgbaFloat<T> | fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha) |
QRgbaFloat<T> | fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha) |
相关非成员
成员函数文档
[constexpr]
quint8 QRgbaFloat::alpha8() const
返回 8 位的 alpha 通道。
[constexpr]
quint16 QRgbaFloat::alpha16() const
以 16 位整数形式返回 alpha 通道。
[constexpr]
float QRgbaFloat::alpha() const
返回 alpha 通道。
另请参见 setAlpha()。
[constexpr]
float QRgbaFloat::alphaNormalized() const
返回归一化为0.0f
和1.0f
之间值的 alpha 通道。
另请参见 alpha()。
[constexpr]
quint8 QRgbaFloat::blue8() const
返回 8 位的蓝色分量。
[constexpr]
quint16 QRgbaFloat::blue16() const
以 16 位整数形式返回蓝色分量。
[constexpr]
float QRgbaFloat::blue() const
返回蓝色分量。
另请参见 setBlue()。
[constexpr]
float QRgbaFloat::blueNormalized() const
返回归一化为0.0f
和1.0f
之间值的蓝色分量。
另请参见 setBlue()。
[static constexpr]
QRgbaFloat<T> QRgbaFloat::fromArgb32(uint rgb)
从 32 位 ARGB 值rgb 构造一个QRgbaFloat 值。
[static constexpr]
QRgbaFloat<T> QRgbaFloat::fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha)
从四个 16 位整数颜色通道red,green,blue 和alpha 构建QRgbaFloat 值。
另请参阅 fromRgba() 。
[static constexpr]
QRgbaFloat<T> QRgbaFloat::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
从四个 8 位色彩通道red,green,blue 和alpha 构建QRgbaFloat 值。
另请参阅 fromArgb32() 。
[constexpr]
quint8 QRgbaFloat::green8() const
返回 8 位的绿色分量。
[constexpr]
quint16 QRgbaFloat::green16() const
以 16 位整数形式返回绿色分量。
[constexpr]
float QRgbaFloat::green() const
返回绿色分量。
另请参见 setGreen()。
[constexpr]
float QRgbaFloat::greenNormalized() const
返回归一化为0.0f
和1.0f
之间值的绿色分量。
另请参见 setGreen()。
[constexpr]
bool QRgbaFloat::isOpaque() const
返回颜色是否完全不透明。
另请参阅 isTransparent() 和alpha()。
[constexpr]
bool QRgbaFloat::isTransparent() const
返回颜色是否完全透明。
[constexpr]
QRgbaFloat<T> QRgbaFloat::premultiplied() const
返回预先乘以 alpha 的颜色。
另请参阅 unpremultiplied()。
[constexpr]
quint8 QRgbaFloat::red8() const
返回 8 位的红色分量。
[constexpr]
quint16 QRgbaFloat::red16() const
以 16 位整数形式返回红色分量。
[constexpr]
float QRgbaFloat::red() const
返回红色分量。
另请参见 setRed()。
[constexpr]
float QRgbaFloat::redNormalized() const
返回归一化为0.0f
和1.0f
之间值的红色分量。
另请参见 setRed()。
void QRgbaFloat::setAlpha(float alpha)
将此颜色的 alpha 设置为alpha 。
另请参阅 alpha() 。
void QRgbaFloat::setBlue(float blue)
将此颜色的蓝色分量设置为blue 。
另请参见 blue()。
void QRgbaFloat::setGreen(float green)
将此颜色的绿色分量设置为green 。
另请参见 green()。
void QRgbaFloat::setRed(float red)
将此颜色的红色分量设置为red 。
另请参见 red()。
[constexpr]
uint QRgbaFloat::toArgb32() const
以 32 位 ARGB 值返回颜色。
另请参见 fromArgb32()。
[constexpr]
QRgbaFloat<T> QRgbaFloat::unpremultiplied() const
返回未乘以 alpha 值的颜色。
另请参阅 premultiplied()。
© 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.