QRgbaFloat 类

template <typename F> class QRgbaFloat

QRgbaFloat 结构包含 4 部分 RGBA 浮点颜色。 更多...

头: #include <QRgbaFloat>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.2

公共类型

FastType

公共函数

quint8 alpha8 () const
quint16 alpha16 () const
QRgbaFloat::FastType alpha () const
QRgbaFloat::FastType alphaNormalized () const
quint8 blue8 () const
quint16 blue16 () const
QRgbaFloat::FastType blue () const
QRgbaFloat::FastType blueNormalized () const
quint8 green8 () const
quint16 green16 () const
QRgbaFloat::FastType green () const
QRgbaFloat::FastType greenNormalized () const
bool isOpaque () const
bool isTransparent () const
QRgbaFloat<T> premultiplied () const
quint8 red8 () const
quint16 red16 () const
QRgbaFloat::FastType red () const
QRgbaFloat::FastType redNormalized () const
void setAlpha (QRgbaFloat::FastType alpha )
void setBlue (QRgbaFloat::FastType blue )
void setGreen (QRgbaFloat::FastType green )
void setRed (QRgbaFloat::FastType 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 )
QRgbaFloat16
QRgbaFloat32

详细描述

另请参阅 QRgb , QRgba64 ,和 QColor .

成员类型文档编制

[alias] QRgbaFloat:: FastType

别名化的 float .

成员函数文档编制

[constexpr] quint8 QRgbaFloat:: alpha8 () const

Returns the alpha channel as an 8-bit.

[constexpr] quint16 QRgbaFloat:: alpha16 () const

Returns the alpha channel as a 16-bit integer.

[constexpr] QRgbaFloat::FastType QRgbaFloat:: alpha () const

Returns the alpha channel.

另请参阅 setAlpha ().

[constexpr] QRgbaFloat::FastType QRgbaFloat:: alphaNormalized () const

Returns the alpha channel normalized to values between 0.0f and 1.0f .

另请参阅 alpha ().

[constexpr] quint8 QRgbaFloat:: blue8 () const

Returns the blue color component as an 8-bit.

[constexpr] quint16 QRgbaFloat:: blue16 () const

Returns the blue color component as a 16-bit integer.

[constexpr] QRgbaFloat::FastType QRgbaFloat:: blue () const

Returns the blue color component.

另请参阅 setBlue ().

[constexpr] QRgbaFloat::FastType QRgbaFloat:: blueNormalized () const

Returns the blue color component normalized to values between 0.0f and 1.0f .

另请参阅 setBlue ().

[static constexpr] QRgbaFloat < T > QRgbaFloat:: fromArgb32 ( uint rgb )

构造 QRgbaFloat value from the 32bit ARGB value rgb .

另请参阅 fromRgba () 和 toArgb32 ().

[static constexpr] QRgbaFloat < T > QRgbaFloat:: fromRgba64 ( quint16 red , quint16 green , quint16 blue , quint16 alpha )

构造 QRgbaFloat value from the four 16-bit integer color channels red , green , blue and alpha .

另请参阅 fromRgba ().

[static constexpr] QRgbaFloat < T > QRgbaFloat:: fromRgba ( quint8 red , quint8 green , quint8 blue , quint8 alpha )

构造 QRgbaFloat value from the four 8-bit color channels red , green , blue and alpha .

另请参阅 fromArgb32 ().

[constexpr] quint8 QRgbaFloat:: green8 () const

Returns the green color component as an 8-bit.

[constexpr] quint16 QRgbaFloat:: green16 () const

Returns the green color component as a 16-bit integer.

[constexpr] QRgbaFloat::FastType QRgbaFloat:: green () const

Returns the green color component.

另请参阅 setGreen ().

[constexpr] QRgbaFloat::FastType QRgbaFloat:: greenNormalized () const

Returns the green color component normalized to values between 0.0f and 1.0f .

另请参阅 setGreen ().

[constexpr] bool QRgbaFloat:: isOpaque () const

Returns whether the color is fully opaque.

另请参阅 isTransparent () 和 alpha ().

[constexpr] bool QRgbaFloat:: isTransparent () const

Returns whether the color is fully transparent.

另请参阅 isOpaque () 和 alpha ().

[constexpr] QRgbaFloat < T > QRgbaFloat:: premultiplied () const

Returns the color with the alpha premultiplied.

另请参阅 unpremultiplied ().

[constexpr] quint8 QRgbaFloat:: red8 () const

Returns the red color component as an 8-bit.

[constexpr] quint16 QRgbaFloat:: red16 () const

Returns the red color component as a 16-bit integer.

[constexpr] QRgbaFloat::FastType QRgbaFloat:: red () const

Returns the red color component.

另请参阅 setRed ().

[constexpr] QRgbaFloat::FastType QRgbaFloat:: redNormalized () const

Returns the red color component normalized to values between 0.0f and 1.0f .

另请参阅 setRed ().

void QRgbaFloat:: setAlpha ( QRgbaFloat::FastType alpha )

将此颜色的 Alpha 设为 alpha .

另请参阅 alpha ().

void QRgbaFloat:: setBlue ( QRgbaFloat::FastType blue )

将此颜色的蓝色颜色分量设为 blue .

另请参阅 blue ().

void QRgbaFloat:: setGreen ( QRgbaFloat::FastType green )

将此颜色的绿色颜色分量设为 green .

另请参阅 green ().

void QRgbaFloat:: setRed ( QRgbaFloat::FastType red )

将此颜色的红色颜色分量设为 red .

另请参阅 red ().

[constexpr] uint QRgbaFloat:: toArgb32 () const

Returns the color as a 32-bit ARGB value.

另请参阅 fromArgb32 ().

[constexpr] QRgbaFloat < T > QRgbaFloat:: unpremultiplied () const

Returns the color with the alpha unpremultiplied.

另请参阅 premultiplied ().

相关非成员

QRgbaFloat16

A 64-bit data-structure containing four 16-bit floating point color channels: Red, green, blue and alpha.

QRgbaFloat32

A 128-bit data-structure containing four 32-bit floating point color channels: Red, green, blue and alpha.