QRgba64 类

The QRgba64 struct contains a 64-bit RGB color. 更多...

头: #include <QRgba64>
qmake: QT += gui
Since: Qt 5.6

公共函数

QRgba64 () = default
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
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 )

详细描述

The QRgba64 struct contains a 64-bit RGB color.

QRgba64 is a 64-bit data-structure containing four 16-bit color channels: Red, green, blue and alpha.

QRgba64 can be used a replacement for QRgb when higher precision is needed. In particular a premultiplied QRgba64 can operate on unpremultiplied QRgb without loss of precision except for alpha 0.

另请参阅 QRgb and QColor .

成员函数文档编制

[default] QRgba64:: QRgba64 ()

Default constructs an instance of QRgba64.

quint8 QRgba64:: alpha8 () const

Returns the alpha channel as an 8-bit.

quint16 QRgba64:: alpha () const

Returns the 16-bit alpha channel.

另请参阅 setAlpha ().

quint8 QRgba64:: blue8 () const

Returns the blue color component as an 8-bit.

quint16 QRgba64:: blue () const

Returns the 16-bit blue color component.

另请参阅 setBlue ().

[static] QRgba64 QRgba64:: fromArgb32 ( uint rgb )

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

另请参阅 fromRgba ().

[static] QRgba64 QRgba64:: fromRgba64 ( quint64 c )

返回 c 作为 QRgba64 struct.

另请参阅 fromArgb32 ().

[static] QRgba64 QRgba64:: fromRgba64 ( quint16 r , quint16 g , quint16 b , quint16 a )

返回 QRgba64 四元组 ( r , g , b , a ).

另请参阅 fromRgba ().

[static] QRgba64 QRgba64:: fromRgba ( quint8 red , quint8 green , quint8 blue , quint8 alpha )

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

另请参阅 fromArgb32 ().

quint8 QRgba64:: green8 () const

Returns the green color component as an 8-bit.

quint16 QRgba64:: green () const

Returns the 16-bit green color component.

另请参阅 setGreen ().

bool QRgba64:: isOpaque () const

Returns whether the color is fully opaque.

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

bool QRgba64:: isTransparent () const

Returns whether the color is transparent.

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

QRgba64 QRgba64:: premultiplied () const

Returns the color with the alpha premultiplied.

另请参阅 unpremultiplied ().

quint8 QRgba64:: red8 () const

Returns the red color component as an 8-bit.

quint16 QRgba64:: red () const

Returns the 16-bit red color component.

另请参阅 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 ().

uint QRgba64:: toArgb32 () const

Returns the color as a 32-bit ARGB value.

另请参阅 fromArgb32 ().

ushort QRgba64:: toRgb16 () const

Returns the color as a 16-bit RGB value.

另请参阅 toArgb32 ().

QRgba64 QRgba64:: unpremultiplied () const

Returns the color with the alpha unpremultiplied.

另请参阅 premultiplied ().

QRgba64:: operator quint64 () const

Returns the color as a 64bit unsigned integer

QRgba64 QRgba64:: operator= ( quint64 rgba )

Assigns the value rgba to this instance of QRgba64 and returns it.