CopperSpice API  1.9.1
QRgba64 Class Reference

The QRgba64 struct contains a 64-bit RGB color. More...

Public Methods

constexpr quint16 alpha () const
 
constexpr quint8 alpha8 () const
 
constexpr quint16 blue () const
 
constexpr quint8 blue8 () const
 
constexpr quint16 green () const
 
constexpr quint8 green8 () const
 
constexpr bool isOpaque () const
 
constexpr bool isTransparent () const
 
constexpr operator quint64 () const
 
QRgba64 operator= (quint64 rgba64)
 
constexpr QRgba64 premultiplied () const
 
constexpr quint16 red () const
 
constexpr quint8 red8 () const
 
void setAlpha (quint16 alpha)
 
void setBlue (quint16 blue)
 
void setGreen (quint16 green)
 
void setRed (quint16 red)
 
constexpr uint toArgb32 () const
 
constexpr ushort toRgb16 () const
 
constexpr QRgba64 unpremultiplied () const
 

Static Public Methods

constexpr static QRgba64 fromArgb32 (uint rgb)
 
constexpr static QRgba64 fromRgba (quint8 red, quint8 green, quint8 blue, quint8 alpha)
 
constexpr static QRgba64 fromRgba64 (quint16 red, quint16 green, quint16 blue, quint16 alpha)
 
constexpr static QRgba64 fromRgba64 (quint64 c)
 

Detailed Description

QRgba64 is a 64-bit data-structure containing four 16-bit color channels: red, green, blue and alpha. QRgba64 can be used as 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.

See also
QRgb, QColor

Method Documentation

constexpr quint16 QRgba64::alpha ( ) const
inlineconstexpr

Returns the 16-bit alpha channel.

See also
setAlpha()
constexpr quint8 QRgba64::alpha8 ( ) const
inlineconstexpr

Returns the alpha channel as an 8-bit.

constexpr quint16 QRgba64::blue ( ) const
inlineconstexpr

Returns the 16-bit blue color component.

See also
setBlue()
constexpr quint8 QRgba64::blue8 ( ) const
inlineconstexpr

Returns the blue color component as an 8-bit.

constexpr static QRgba64 QRgba64::fromArgb32 ( uint  rgb)
inlinestaticconstexpr

Constructs a QRgba64 value from the 32bit ARGB value rgb.

See also
fromRgba()
constexpr static QRgba64 QRgba64::fromRgba ( quint8  red,
quint8  green,
quint8  blue,
quint8  alpha 
)
inlinestaticconstexpr

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

See also
fromArgb32()
constexpr static QRgba64 QRgba64::fromRgba64 ( quint16  red,
quint16  green,
quint16  blue,
quint16  alpha 
)
inlinestaticconstexpr

Returns the QRgba64 quadruplet (red, green, blue, alpha).

See also
fromRgba()
constexpr static QRgba64 QRgba64::fromRgba64 ( quint64  c)
inlinestaticconstexpr

Returns c as a QRgba64 struct.

See also
fromArgb32()
constexpr quint16 QRgba64::green ( ) const
inlineconstexpr

Returns the 16-bit green color component.

See also
setGreen()
constexpr quint8 QRgba64::green8 ( ) const
inlineconstexpr

Returns the green color component as an 8-bit.

constexpr bool QRgba64::isOpaque ( ) const
inlineconstexpr

Returns whether the color is fully opaque.

See also
isTransparent(), alpha()
constexpr bool QRgba64::isTransparent ( ) const
inlineconstexpr

Returns whether the color is transparent.

See also
isOpaque(), alpha()
constexpr QRgba64::operator quint64 ( ) const
inlineconstexpr

Returns the color as a 64bit unsigned integer

QRgba64 QRgba64::operator= ( quint64  rgba64)
inline

Copy assigns from rgba64 and returns a reference to this object.

constexpr QRgba64 QRgba64::premultiplied ( ) const
inlineconstexpr

Returns the color with the alpha premultiplied.

See also
unpremultiplied()
constexpr quint16 QRgba64::red ( ) const
inlineconstexpr

Returns the 16-bit red color component.

See also
setRed()
constexpr quint8 QRgba64::red8 ( ) const
inlineconstexpr

Returns the red color component as an 8-bit.

void QRgba64::setAlpha ( quint16  alpha)
inline

Sets the alpha of this color to alpha.

See also
alpha()
void QRgba64::setBlue ( quint16  blue)
inline

Sets the blue color component of this color to blue.

See also
blue()
void QRgba64::setGreen ( quint16  green)
inline

Sets the green color component of this color to green.

See also
green()
void QRgba64::setRed ( quint16  red)
inline

Sets the red color component of this color to red.

See also
red()
constexpr uint QRgba64::toArgb32 ( ) const
inlineconstexpr

Returns the color as a 32-bit ARGB value.

See also
fromArgb32()
constexpr ushort QRgba64::toRgb16 ( ) const
inlineconstexpr

Returns the color as a 16-bit RGB value.

See also
toArgb32()
constexpr QRgba64 QRgba64::unpremultiplied ( ) const
inlineconstexpr

Returns the color with the alpha unpremultiplied.

See also
premultiplied()