Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QRgbaFloat< F > Class Template Reference

#include <qrgbafloat.h>

+ Collaboration diagram for QRgbaFloat< F >:

Public Types

using Type = F
 
using FastType = float
 

Public Member Functions

constexpr bool isOpaque () const
 
constexpr bool isTransparent () const
 
constexpr float red () const
 
constexpr float green () const
 
constexpr float blue () const
 
constexpr float alpha () const
 
void setRed (float _red)
 
void setGreen (float _green)
 
void setBlue (float _blue)
 
void setAlpha (float _alpha)
 
constexpr float redNormalized () const
 
constexpr float greenNormalized () const
 
constexpr float blueNormalized () const
 
constexpr float alphaNormalized () const
 
constexpr quint8 red8 () const
 
constexpr quint8 green8 () const
 
constexpr quint8 blue8 () const
 
constexpr quint8 alpha8 () const
 
constexpr uint toArgb32 () const
 
constexpr quint16 red16 () const
 
constexpr quint16 green16 () const
 
constexpr quint16 blue16 () const
 
constexpr quint16 alpha16 () const
 
constexpr Q_ALWAYS_INLINE QRgbaFloat premultiplied () const
 
constexpr Q_ALWAYS_INLINE QRgbaFloat unpremultiplied () const
 
constexpr bool operator== (QRgbaFloat f) const
 
constexpr bool operator!= (QRgbaFloat f) const
 

Static Public Member Functions

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

Public Attributes

r
 
g
 
b
 
a
 

Detailed Description

template<typename F>
class QRgbaFloat< F >

Definition at line 17 of file qrgbafloat.h.

Member Typedef Documentation

◆ FastType

template<typename F >
using QRgbaFloat< F >::FastType = float

Definition at line 27 of file qrgbafloat.h.

◆ Type

template<typename F >
using QRgbaFloat< F >::Type = F

Definition at line 21 of file qrgbafloat.h.

Member Function Documentation

◆ alpha()

template<typename F >
constexpr float QRgbaFloat< F >::alpha ( ) const
inlineconstexpr

Definition at line 67 of file qrgbafloat.h.

References QRgbaFloat< F >::a.

◆ alpha16()

template<typename F >
constexpr quint16 QRgbaFloat< F >::alpha16 ( ) const
inlineconstexpr

Definition at line 90 of file qrgbafloat.h.

References QRgbaFloat< F >::alphaNormalized(), and qRound().

+ Here is the call graph for this function:

◆ alpha8()

template<typename F >
constexpr quint8 QRgbaFloat< F >::alpha8 ( ) const
inlineconstexpr

Definition at line 81 of file qrgbafloat.h.

References QRgbaFloat< F >::alphaNormalized(), and qRound().

Referenced by QRgbaFloat< F >::toArgb32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alphaNormalized()

template<typename F >
constexpr float QRgbaFloat< F >::alphaNormalized ( ) const
inlineconstexpr

Definition at line 76 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::alpha16(), and QRgbaFloat< F >::alpha8().

+ Here is the caller graph for this function:

◆ blue()

template<typename F >
constexpr float QRgbaFloat< F >::blue ( ) const
inlineconstexpr

Definition at line 66 of file qrgbafloat.h.

References QRgbaFloat< F >::b.

◆ blue16()

template<typename F >
constexpr quint16 QRgbaFloat< F >::blue16 ( ) const
inlineconstexpr

Definition at line 89 of file qrgbafloat.h.

References QRgbaFloat< F >::blueNormalized(), and qRound().

+ Here is the call graph for this function:

◆ blue8()

template<typename F >
constexpr quint8 QRgbaFloat< F >::blue8 ( ) const
inlineconstexpr

Definition at line 80 of file qrgbafloat.h.

References QRgbaFloat< F >::blueNormalized(), and qRound().

Referenced by QRgbaFloat< F >::toArgb32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blueNormalized()

template<typename F >
constexpr float QRgbaFloat< F >::blueNormalized ( ) const
inlineconstexpr

Definition at line 75 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::blue16(), and QRgbaFloat< F >::blue8().

+ Here is the caller graph for this function:

◆ fromArgb32()

template<typename F >
static constexpr QRgbaFloat QRgbaFloat< F >::fromArgb32 ( uint rgb)
inlinestaticconstexpr

Definition at line 56 of file qrgbafloat.h.

References QRgbaFloat< F >::fromRgba(), and rgb.

Referenced by convertPixelToRGB32F(), convertPixelToRGBA32F(), fetchIndexedToRGBA32F(), QImage::fill(), QImage::setPixel(), storeRGB16FFromRGB32(), storeRGB32FFromRGB32(), storeRGBA16FFromARGB32PM(), and storeRGBA32FFromARGB32PM().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromRgba()

template<typename F >
static constexpr QRgbaFloat QRgbaFloat< F >::fromRgba ( quint8 red,
quint8 green,
quint8 blue,
quint8 alpha )
inlinestaticconstexpr

Definition at line 46 of file qrgbafloat.h.

References QRgbaFloat< F >::red().

Referenced by QRgbaFloat< F >::fromArgb32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromRgba64()

template<typename F >
static constexpr QRgbaFloat QRgbaFloat< F >::fromRgba64 ( quint16 red,
quint16 green,
quint16 blue,
quint16 alpha )
inlinestaticconstexpr

Definition at line 35 of file qrgbafloat.h.

References QRgbaFloat< F >::red().

Referenced by qConvertRgb64ToRgbaF16(), and qConvertRgb64ToRgbaF32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ green()

template<typename F >
constexpr float QRgbaFloat< F >::green ( ) const
inlineconstexpr

Definition at line 65 of file qrgbafloat.h.

References QRgbaFloat< F >::g.

◆ green16()

template<typename F >
constexpr quint16 QRgbaFloat< F >::green16 ( ) const
inlineconstexpr

Definition at line 88 of file qrgbafloat.h.

References QRgbaFloat< F >::greenNormalized(), and qRound().

+ Here is the call graph for this function:

◆ green8()

template<typename F >
constexpr quint8 QRgbaFloat< F >::green8 ( ) const
inlineconstexpr

Definition at line 79 of file qrgbafloat.h.

References QRgbaFloat< F >::greenNormalized(), and qRound().

Referenced by QRgbaFloat< F >::toArgb32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ greenNormalized()

template<typename F >
constexpr float QRgbaFloat< F >::greenNormalized ( ) const
inlineconstexpr

Definition at line 74 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::green16(), and QRgbaFloat< F >::green8().

+ Here is the caller graph for this function:

◆ isOpaque()

template<typename F >
constexpr bool QRgbaFloat< F >::isOpaque ( ) const
inlineconstexpr

Definition at line 61 of file qrgbafloat.h.

◆ isTransparent()

template<typename F >
constexpr bool QRgbaFloat< F >::isTransparent ( ) const
inlineconstexpr

Definition at line 62 of file qrgbafloat.h.

◆ operator!=()

template<typename F >
constexpr bool QRgbaFloat< F >::operator!= ( QRgbaFloat< F > f) const
inlineconstexpr

Definition at line 109 of file qrgbafloat.h.

◆ operator==()

template<typename F >
constexpr bool QRgbaFloat< F >::operator== ( QRgbaFloat< F > f) const
inlineconstexpr

Definition at line 105 of file qrgbafloat.h.

◆ premultiplied()

template<typename F >
constexpr Q_ALWAYS_INLINE QRgbaFloat QRgbaFloat< F >::premultiplied ( ) const
inlineconstexpr

Definition at line 92 of file qrgbafloat.h.

References QRgbaFloat< F >::a.

Referenced by fetchRGBA16FToRGBA64PM(), fetchRGBA32FToRGBA64PM(), QImage::fill(), and QImage::setPixelColor().

+ Here is the caller graph for this function:

◆ red()

template<typename F >
constexpr float QRgbaFloat< F >::red ( ) const
inlineconstexpr

Definition at line 64 of file qrgbafloat.h.

References QRgbaFloat< F >::r.

Referenced by QRgbaFloat< F >::fromRgba(), and QRgbaFloat< F >::fromRgba64().

+ Here is the caller graph for this function:

◆ red16()

template<typename F >
constexpr quint16 QRgbaFloat< F >::red16 ( ) const
inlineconstexpr

Definition at line 87 of file qrgbafloat.h.

References qRound(), and QRgbaFloat< F >::redNormalized().

+ Here is the call graph for this function:

◆ red8()

template<typename F >
constexpr quint8 QRgbaFloat< F >::red8 ( ) const
inlineconstexpr

Definition at line 78 of file qrgbafloat.h.

References qRound(), and QRgbaFloat< F >::redNormalized().

Referenced by QRgbaFloat< F >::toArgb32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redNormalized()

template<typename F >
constexpr float QRgbaFloat< F >::redNormalized ( ) const
inlineconstexpr

Definition at line 73 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::red16(), and QRgbaFloat< F >::red8().

+ Here is the caller graph for this function:

◆ setAlpha()

template<typename F >
void QRgbaFloat< F >::setAlpha ( float _alpha)
inline

Definition at line 71 of file qrgbafloat.h.

◆ setBlue()

template<typename F >
void QRgbaFloat< F >::setBlue ( float _blue)
inline

Definition at line 70 of file qrgbafloat.h.

◆ setGreen()

template<typename F >
void QRgbaFloat< F >::setGreen ( float _green)
inline

Definition at line 69 of file qrgbafloat.h.

◆ setRed()

template<typename F >
void QRgbaFloat< F >::setRed ( float _red)
inline

Definition at line 68 of file qrgbafloat.h.

◆ toArgb32()

template<typename F >
constexpr uint QRgbaFloat< F >::toArgb32 ( ) const
inlineconstexpr

Definition at line 82 of file qrgbafloat.h.

References QRgbaFloat< F >::alpha8(), QRgbaFloat< F >::blue8(), QRgbaFloat< F >::green8(), and QRgbaFloat< F >::red8().

Referenced by fetch1Pixel< QPixelLayout::BPP16FPx4 >(), fetch1Pixel< QPixelLayout::BPP32FPx4 >(), fetchPixel< QPixelLayout::BPP16FPx4 >(), fetchPixel< QPixelLayout::BPP32FPx4 >(), fetchRGBA16FToARGB32PM(), and fetchRGBA32FToARGB32PM().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unpremultiplied()

template<typename F >
constexpr Q_ALWAYS_INLINE QRgbaFloat QRgbaFloat< F >::unpremultiplied ( ) const
inlineconstexpr

Definition at line 96 of file qrgbafloat.h.

References QRgbaFloat< F >::a.

Referenced by convert_RGBA16FPM_to_RGBA16F(), convert_RGBA16FPM_to_RGBA16F_inplace(), and QImage::pixelColor().

+ Here is the caller graph for this function:

Member Data Documentation

◆ a

◆ b

template<typename F >
F QRgbaFloat< F >::b

Definition at line 31 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::blue().

◆ g

template<typename F >
F QRgbaFloat< F >::g

Definition at line 30 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::green().

◆ r

template<typename F >
F QRgbaFloat< F >::r

Definition at line 29 of file qrgbafloat.h.

Referenced by QRgbaFloat< F >::red().


The documentation for this class was generated from the following files: