Struct qt_gui::QRgba64

source ·
#[repr(C)]
pub struct QRgba64 { /* private fields */ }
Expand description

The QRgba64 struct contains a 64-bit RGB color.

C++ class: QRgba64.

C++ documentation:

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

source

pub unsafe fn alpha(&self) -> u16

Returns the 16-bit alpha channel.

Calls C++ function: quint16 QRgba64::alpha() const.

C++ documentation:

Returns the 16-bit alpha channel.

See also setAlpha().

source

pub unsafe fn alpha8(&self) -> u8

Returns the alpha channel as an 8-bit.

Calls C++ function: quint8 QRgba64::alpha8() const.

C++ documentation:

Returns the alpha channel as an 8-bit.

source

pub unsafe fn blue(&self) -> u16

Returns the 16-bit blue color component.

Calls C++ function: quint16 QRgba64::blue() const.

C++ documentation:

Returns the 16-bit blue color component.

See also setBlue().

source

pub unsafe fn blue8(&self) -> u8

Returns the blue color component as an 8-bit.

Calls C++ function: quint8 QRgba64::blue8() const.

C++ documentation:

Returns the blue color component as an 8-bit.

source

pub unsafe fn copy_from_u64(&self, rgba: u64) -> CppBox<QRgba64>

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

Calls C++ function: QRgba64 QRgba64::operator=(quint64 _rgba).

C++ documentation:

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

source

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).

C++ documentation:

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.

source

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).

C++ documentation:

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

See also fromRgba().

source

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).

C++ documentation:

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

See also fromArgb32().

source

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).

C++ documentation:

Returns c as a QRgba64 struct.

See also fromArgb32().

source

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).

C++ documentation:

Returns the QRgba64 quadruplet (r, g, b, a).

See also fromRgba().

source

pub unsafe fn green(&self) -> u16

Returns the 16-bit green color component.

Calls C++ function: quint16 QRgba64::green() const.

C++ documentation:

Returns the 16-bit green color component.

See also setGreen().

source

pub unsafe fn green8(&self) -> u8

Returns the green color component as an 8-bit.

Calls C++ function: quint8 QRgba64::green8() const.

C++ documentation:

Returns the green color component as an 8-bit.

source

pub unsafe fn is_opaque(&self) -> bool

Returns whether the color is fully opaque.

Calls C++ function: bool QRgba64::isOpaque() const.

C++ documentation:

Returns whether the color is fully opaque.

See also isTransparent() and alpha().

source

pub unsafe fn is_transparent(&self) -> bool

Returns whether the color is transparent.

Calls C++ function: bool QRgba64::isTransparent() const.

C++ documentation:

Returns whether the color is transparent.

See also isOpaque() and alpha().

source

pub unsafe fn new() -> CppBox<QRgba64>

Default constructs an instance of QRgba64.

Calls C++ function: [constructor] void QRgba64::QRgba64().

C++ documentation:

Default constructs an instance of QRgba64.

source

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).

C++ documentation:

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.

source

pub unsafe fn premultiplied(&self) -> CppBox<QRgba64>

Returns the color with the alpha premultiplied.

Calls C++ function: QRgba64 QRgba64::premultiplied() const.

C++ documentation:

Returns the color with the alpha premultiplied.

See also unpremultiplied().

source

pub unsafe fn red(&self) -> u16

Returns the 16-bit red color component.

Calls C++ function: quint16 QRgba64::red() const.

C++ documentation:

Returns the 16-bit red color component.

See also setRed().

source

pub unsafe fn red8(&self) -> u8

Returns the red color component as an 8-bit.

Calls C++ function: quint8 QRgba64::red8() const.

C++ documentation:

Returns the red color component as an 8-bit.

source

pub unsafe fn set_alpha(&self, alpha: u16)

Sets the alpha of this color to alpha.

Calls C++ function: void QRgba64::setAlpha(quint16 _alpha).

C++ documentation:

Sets the alpha of this color to alpha.

See also alpha().

source

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).

C++ documentation:

Sets the blue color component of this color to blue.

See also blue().

source

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).

C++ documentation:

Sets the green color component of this color to green.

See also green().

source

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).

C++ documentation:

Sets the red color component of this color to red.

See also red().

source

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.

C++ documentation:

Returns the color as a 32-bit ARGB value.

See also fromArgb32().

source

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.

C++ documentation:

Returns the color as a 16-bit RGB value.

See also toArgb32().

source

pub unsafe fn to_u64(&self) -> u64

Returns the color as a 64bit unsigned integer

Calls C++ function: quint64 QRgba64::operator quint64() const.

C++ documentation:

Returns the color as a 64bit unsigned integer

source

pub unsafe fn unpremultiplied(&self) -> CppBox<QRgba64>

Returns the color with the alpha unpremultiplied.

Calls C++ function: QRgba64 QRgba64::unpremultiplied() const.

C++ documentation:

Returns the color with the alpha unpremultiplied.

See also premultiplied().

Trait Implementations§

source§

impl CppDeletable for QRgba64

source§

unsafe fn delete(&self)

The QRgba64 struct contains a 64-bit RGB color.

Calls C++ function: [destructor] void QRgba64::~QRgba64().

C++ documentation:

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.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.