IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QRgbaFloat Class

The QRgbaFloat struct contains a four part RGBA floating-point color.

This class was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QRgbaFloat Class

  • Header: QRgbaFloat

  • Since: Qt 6.2

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Group: QRgbaFloat is part of Painting Classes

Detailed Description

 

See Also

See also QRgb, QRgba64, QColor

Member Type Documentation

 

[alias] QRgbaFloat::FastType

Alias for float.

Member Function Documentation

 

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

See Also

See also setAlpha()

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

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

See Also

See also 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.

See Also

See also setBlue()

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

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

See Also

See also setBlue()

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

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

See Also

See also fromRgba(), toArgb32()

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

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

See Also

See also fromRgba()

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

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

See Also

See also 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.

See Also

See also setGreen()

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

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

See Also

See also setGreen()

[constexpr] bool QRgbaFloat::isOpaque() const

Returns whether the color is fully opaque.

See Also

See also isTransparent(), alpha()

[constexpr] bool QRgbaFloat::isTransparent() const

Returns whether the color is fully transparent.

See Also

See also isOpaque(), alpha()

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

Returns the color with the alpha premultiplied.

See Also

See also 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.

See Also

See also setRed()

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

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

See Also

See also setRed()

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

Sets the alpha of this color to alpha.

See Also

See also alpha()

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

Sets the blue color component of this color to blue.

See Also

See also blue()

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

Sets the green color component of this color to green.

See Also

See also green()

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

Sets the red color component of this color to red.

See Also

See also red()

[constexpr] uint QRgbaFloat::toArgb32() const

Returns the color as a 32-bit ARGB value.

See Also

See also fromArgb32()

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

Returns the color with the alpha unpremultiplied.

See Also

See also premultiplied()

Related Non-Members

 

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+