pub struct QRgba64 { /* private fields */ }Expand description
The QRgba64 struct contains a 64-bit RGB color.
C++ class: QRgba64.
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.
Implementations§
Source§impl QRgba64
impl QRgba64
Sourcepub unsafe fn alpha(&self) -> u16
pub unsafe fn alpha(&self) -> u16
Returns the 16-bit alpha channel.
Calls C++ function: quint16 QRgba64::alpha() const.
Returns the 16-bit alpha channel.
See also setAlpha().
Sourcepub unsafe fn alpha8(&self) -> u8
pub unsafe fn alpha8(&self) -> u8
Returns the alpha channel as an 8-bit.
Calls C++ function: quint8 QRgba64::alpha8() const.
Returns the alpha channel as an 8-bit.
Sourcepub unsafe fn blue(&self) -> u16
pub unsafe fn blue(&self) -> u16
Returns the 16-bit blue color component.
Calls C++ function: quint16 QRgba64::blue() const.
Returns the 16-bit blue color component.
See also setBlue().
Sourcepub unsafe fn blue8(&self) -> u8
pub unsafe fn blue8(&self) -> u8
Returns the blue color component as an 8-bit.
Calls C++ function: quint8 QRgba64::blue8() const.
Returns the blue color component as an 8-bit.
Sourcepub unsafe fn copy_from_u64(&self, rgba: u64) -> CppBox<QRgba64>
pub unsafe fn copy_from_u64(&self, rgba: u64) -> CppBox<QRgba64>
Sourcepub unsafe fn copy_from_q_rgba64(
&self,
other: impl CastInto<Ref<QRgba64>>,
) -> Ref<QRgba64>
pub unsafe fn copy_from_q_rgba64( &self, other: impl CastInto<Ref<QRgba64>>, ) -> Ref<QRgba64>
The QRgba64 struct contains a 64-bit RGB color.
Calls C++ function: QRgba64& QRgba64::operator=(const QRgba64& other).
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.
Sourcepub unsafe fn from_argb32(rgb: c_uint) -> CppBox<QRgba64>
pub unsafe fn from_argb32(rgb: c_uint) -> CppBox<QRgba64>
Constructs a QRgba64 value from the 32bit ARGB value rgb.
Calls C++ function: static QRgba64 QRgba64::fromArgb32(unsigned int rgb).
Sourcepub unsafe fn from_rgba(
red: u8,
green: u8,
blue: u8,
alpha: u8,
) -> CppBox<QRgba64>
pub unsafe fn from_rgba( red: u8, green: u8, blue: u8, alpha: u8, ) -> CppBox<QRgba64>
Constructs a QRgba64 value from the four 8-bit color channels red, green, blue and alpha.
Calls C++ function: static QRgba64 QRgba64::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha).
Constructs a QRgba64 value from the four 8-bit color channels red, green, blue and alpha.
See also fromArgb32().
Sourcepub unsafe fn from_rgba64_1a(c: u64) -> CppBox<QRgba64>
pub unsafe fn from_rgba64_1a(c: u64) -> CppBox<QRgba64>
Returns c as a QRgba64 struct.
Calls C++ function: static QRgba64 QRgba64::fromRgba64(quint64 c).
Returns c as a QRgba64 struct.
See also fromArgb32().
Sourcepub unsafe fn from_rgba64_4a(
red: u16,
green: u16,
blue: u16,
alpha: u16,
) -> CppBox<QRgba64>
pub unsafe fn from_rgba64_4a( red: u16, green: u16, blue: u16, alpha: u16, ) -> CppBox<QRgba64>
Returns the QRgba64 quadruplet (r, g, b, a).
Calls C++ function: static QRgba64 QRgba64::fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha).
Sourcepub unsafe fn green(&self) -> u16
pub unsafe fn green(&self) -> u16
Returns the 16-bit green color component.
Calls C++ function: quint16 QRgba64::green() const.
Returns the 16-bit green color component.
See also setGreen().
Sourcepub unsafe fn green8(&self) -> u8
pub unsafe fn green8(&self) -> u8
Returns the green color component as an 8-bit.
Calls C++ function: quint8 QRgba64::green8() const.
Returns the green color component as an 8-bit.
Sourcepub unsafe fn is_opaque(&self) -> bool
pub unsafe fn is_opaque(&self) -> bool
Returns whether the color is fully opaque.
Calls C++ function: bool QRgba64::isOpaque() const.
Returns whether the color is fully opaque.
See also isTransparent() and alpha().
Sourcepub unsafe fn is_transparent(&self) -> bool
pub unsafe fn is_transparent(&self) -> bool
Returns whether the color is transparent.
Calls C++ function: bool QRgba64::isTransparent() const.
Sourcepub unsafe fn new() -> CppBox<QRgba64>
pub unsafe fn new() -> CppBox<QRgba64>
Default constructs an instance of QRgba64.
Calls C++ function: [constructor] void QRgba64::QRgba64().
Default constructs an instance of QRgba64.
Sourcepub unsafe fn new_copy(other: impl CastInto<Ref<QRgba64>>) -> CppBox<QRgba64>
pub unsafe fn new_copy(other: impl CastInto<Ref<QRgba64>>) -> CppBox<QRgba64>
The QRgba64 struct contains a 64-bit RGB color.
Calls C++ function: [constructor] void QRgba64::QRgba64(const QRgba64& other).
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.
Sourcepub unsafe fn premultiplied(&self) -> CppBox<QRgba64>
pub unsafe fn premultiplied(&self) -> CppBox<QRgba64>
Returns the color with the alpha premultiplied.
Calls C++ function: QRgba64 QRgba64::premultiplied() const.
Returns the color with the alpha premultiplied.
See also unpremultiplied().
Sourcepub unsafe fn red(&self) -> u16
pub unsafe fn red(&self) -> u16
Returns the 16-bit red color component.
Calls C++ function: quint16 QRgba64::red() const.
Returns the 16-bit red color component.
See also setRed().
Sourcepub unsafe fn red8(&self) -> u8
pub unsafe fn red8(&self) -> u8
Returns the red color component as an 8-bit.
Calls C++ function: quint8 QRgba64::red8() const.
Returns the red color component as an 8-bit.
Sourcepub unsafe fn set_alpha(&self, alpha: u16)
pub unsafe fn set_alpha(&self, alpha: u16)
Sets the alpha of this color to alpha.
Calls C++ function: void QRgba64::setAlpha(quint16 _alpha).
Sets the alpha of this color to alpha.
See also alpha().
Sourcepub unsafe fn set_blue(&self, blue: u16)
pub unsafe fn set_blue(&self, blue: u16)
Sets the blue color component of this color to blue.
Calls C++ function: void QRgba64::setBlue(quint16 _blue).
Sets the blue color component of this color to blue.
See also blue().
Sourcepub unsafe fn set_green(&self, green: u16)
pub unsafe fn set_green(&self, green: u16)
Sets the green color component of this color to green.
Calls C++ function: void QRgba64::setGreen(quint16 _green).
Sets the green color component of this color to green.
See also green().
Sourcepub unsafe fn set_red(&self, red: u16)
pub unsafe fn set_red(&self, red: u16)
Sets the red color component of this color to red.
Calls C++ function: void QRgba64::setRed(quint16 _red).
Sets the red color component of this color to red.
See also red().
Sourcepub unsafe fn to_argb32(&self) -> c_uint
pub unsafe fn to_argb32(&self) -> c_uint
Returns the color as a 32-bit ARGB value.
Calls C++ function: unsigned int QRgba64::toArgb32() const.
Returns the color as a 32-bit ARGB value.
See also fromArgb32().
Sourcepub unsafe fn to_rgb16(&self) -> c_ushort
pub unsafe fn to_rgb16(&self) -> c_ushort
Returns the color as a 16-bit RGB value.
Calls C++ function: unsigned short QRgba64::toRgb16() const.
Returns the color as a 16-bit RGB value.
See also toArgb32().
Sourcepub unsafe fn to_u64(&self) -> u64
pub unsafe fn to_u64(&self) -> u64
Returns the color as a 64bit unsigned integer
Calls C++ function: quint64 QRgba64::operator quint64() const.
Returns the color as a 64bit unsigned integer
Sourcepub unsafe fn unpremultiplied(&self) -> CppBox<QRgba64>
pub unsafe fn unpremultiplied(&self) -> CppBox<QRgba64>
Returns the color with the alpha unpremultiplied.
Calls C++ function: QRgba64 QRgba64::unpremultiplied() const.
Returns the color with the alpha unpremultiplied.
See also premultiplied().
Trait Implementations§
Source§impl CppDeletable for QRgba64
impl CppDeletable for QRgba64
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QRgba64 struct contains a 64-bit RGB color.
Calls C++ function: [destructor] void QRgba64::~QRgba64().
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.