Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_dib.h File Reference

(ab965b1c2c3e7e4cd62a4b45abfaf393f4fb4618)

#include <stdint.h>
#include <tuple>
#include <utility>
+ Include dependency graph for fx_dib.h:

Go to the source code of this file.

Classes

struct  FXDIB_ResampleOptions
 

Macros

#define FXARGB_A(argb)
 
#define FXARGB_R(argb)
 
#define FXARGB_G(argb)
 
#define FXARGB_B(argb)
 
#define FXARGB_MUL_ALPHA(argb, alpha)
 
#define FXRGB2GRAY(r, g, b)
 
#define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha)
 
#define FXARGB_GETDIB(p)
 
#define FXARGB_SETDIB(p, argb)
 
#define FXARGB_SETRGBORDERDIB(p, argb)
 
#define FXCMYK_TODIB(cmyk)
 
#define FXARGB_TOBGRORDERDIB(argb)
 

Typedefs

using FX_ARGB = uint32_t
 
using FX_CMYK = uint32_t
 
using FX_COLORREF = uint32_t
 

Enumerations

enum class  FXDIB_Format : uint16_t {
  kInvalid = 0 , k1bppRgb = 0x001 , k8bppRgb = 0x008 , kRgb = 0x018 ,
  kRgb32 = 0x020 , k1bppMask = 0x101 , k8bppMask = 0x108 , kArgb = 0x220
}
 
enum class  BlendMode {
  kNormal = 0 , kMultiply , kScreen , kOverlay ,
  kDarken , kLighten , kColorDodge , kColorBurn ,
  kHardLight , kSoftLight , kDifference , kExclusion ,
  kHue , kSaturation , kColor , kLuminosity ,
  kLast = kLuminosity
}
 

Functions

constexpr uint32_t FXSYS_BGR (uint8_t b, uint8_t g, uint8_t r)
 
constexpr uint8_t FXSYS_GetRValue (uint32_t bgr)
 
constexpr uint8_t FXSYS_GetGValue (uint32_t bgr)
 
constexpr uint8_t FXSYS_GetBValue (uint32_t bgr)
 
constexpr unsigned int FXSYS_GetUnsignedAlpha (float alpha)
 
int GetBppFromFormat (FXDIB_Format format)
 
int GetCompsFromFormat (FXDIB_Format format)
 
bool GetIsMaskFromFormat (FXDIB_Format format)
 
FXDIB_Format MakeRGBFormat (int bpp)
 
constexpr FX_CMYK CmykEncode (uint32_t c, uint32_t m, uint32_t y, uint32_t k)
 
std::tuple< int, int, int, int > ArgbDecode (FX_ARGB argb)
 
std::pair< int, FX_COLORREFArgbToAlphaAndColorRef (FX_ARGB argb)
 
FX_COLORREF ArgbToColorRef (FX_ARGB argb)
 
constexpr FX_ARGB ArgbEncode (uint32_t a, uint32_t r, uint32_t g, uint32_t b)
 
FX_ARGB AlphaAndColorRefToArgb (int a, FX_COLORREF colorref)
 
void ReverseCopy3Bytes (uint8_t *dest, const uint8_t *src)
 

Macro Definition Documentation

◆ FXARGB_A

#define FXARGB_A ( argb)
Value:
((uint8_t)((argb) >> 24))

Definition at line 124 of file fx_dib.h.

◆ FXARGB_B

#define FXARGB_B ( argb)
Value:
((uint8_t)(argb))

Definition at line 127 of file fx_dib.h.

◆ FXARGB_G

#define FXARGB_G ( argb)
Value:
((uint8_t)((argb) >> 8))

Definition at line 126 of file fx_dib.h.

◆ FXARGB_GETDIB

#define FXARGB_GETDIB ( p)
Value:
((((uint8_t*)(p))[0]) | (((uint8_t*)(p))[1] << 8) | \
(((uint8_t*)(p))[2] << 16) | (((uint8_t*)(p))[3] << 24))
GLfloat GLfloat p
[1]

Definition at line 134 of file fx_dib.h.

◆ FXARGB_MUL_ALPHA

#define FXARGB_MUL_ALPHA ( argb,
alpha )
Value:
(((((argb) >> 24) * (alpha) / 255) << 24) | ((argb)&0xffffff))
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418

Definition at line 128 of file fx_dib.h.

◆ FXARGB_R

#define FXARGB_R ( argb)
Value:
((uint8_t)((argb) >> 16))

Definition at line 125 of file fx_dib.h.

◆ FXARGB_SETDIB

#define FXARGB_SETDIB ( p,
argb )
Value:
((uint8_t*)(p))[0] = (uint8_t)(argb), \
((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
((uint8_t*)(p))[2] = (uint8_t)((argb) >> 16), \
((uint8_t*)(p))[3] = (uint8_t)((argb) >> 24)

Definition at line 137 of file fx_dib.h.

◆ FXARGB_SETRGBORDERDIB

#define FXARGB_SETRGBORDERDIB ( p,
argb )
Value:
((uint8_t*)(p))[3] = (uint8_t)(argb >> 24), \
((uint8_t*)(p))[0] = (uint8_t)((argb) >> 16), \
((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \
((uint8_t*)(p))[2] = (uint8_t)(argb)

Definition at line 142 of file fx_dib.h.

◆ FXARGB_TOBGRORDERDIB

#define FXARGB_TOBGRORDERDIB ( argb)
Value:
((uint8_t)(argb >> 16) | ((uint8_t)(argb >> 8)) << 8 | \
((uint8_t)(argb)) << 16 | ((uint8_t)(argb >> 24) << 24))

Definition at line 150 of file fx_dib.h.

◆ FXCMYK_TODIB

#define FXCMYK_TODIB ( cmyk)
Value:
((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | \
((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24))

Definition at line 147 of file fx_dib.h.

◆ FXDIB_ALPHA_MERGE

#define FXDIB_ALPHA_MERGE ( backdrop,
source,
source_alpha )
Value:
(((backdrop) * (255 - (source_alpha)) + (source) * (source_alpha)) / 255)
GLsizei GLsizei GLchar * source

Definition at line 132 of file fx_dib.h.

◆ FXRGB2GRAY

#define FXRGB2GRAY ( r,
g,
b )
Value:
(((b)*11 + (g)*59 + (r)*30) / 100)
GLboolean GLboolean GLboolean b
GLboolean r
[2]
GLboolean GLboolean g

Definition at line 131 of file fx_dib.h.

Typedef Documentation

◆ FX_ARGB

using FX_ARGB = uint32_t

Definition at line 30 of file fx_dib.h.

◆ FX_CMYK

using FX_CMYK = uint32_t

Definition at line 31 of file fx_dib.h.

◆ FX_COLORREF

using FX_COLORREF = uint32_t

Definition at line 34 of file fx_dib.h.

Enumeration Type Documentation

◆ BlendMode

enum class BlendMode
strong
Enumerator
kNormal 
kMultiply 
kScreen 
kOverlay 
kDarken 
kLighten 
kColorDodge 
kColorBurn 
kHardLight 
kSoftLight 
kDifference 
kExclusion 
kHue 
kSaturation 
kColor 
kLuminosity 
kLast 

Definition at line 49 of file fx_dib.h.

◆ FXDIB_Format

enum class FXDIB_Format : uint16_t
strong
Enumerator
kInvalid 
k1bppRgb 
k8bppRgb 
kRgb 
kRgb32 
k1bppMask 
k8bppMask 
kArgb 

Definition at line 19 of file fx_dib.h.

Function Documentation

◆ AlphaAndColorRefToArgb()

FX_ARGB AlphaAndColorRefToArgb ( int a,
FX_COLORREF colorref )

Definition at line 57 of file fx_dib.cpp.

References ArgbEncode(), FXSYS_GetBValue(), FXSYS_GetGValue(), and FXSYS_GetRValue().

Referenced by CXFA_Stipple::Draw().

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

◆ ArgbDecode()

std::tuple< int, int, int, int > ArgbDecode ( FX_ARGB argb)

Definition at line 44 of file fx_dib.cpp.

◆ ArgbEncode()

◆ ArgbToAlphaAndColorRef()

std::pair< int, FX_COLORREF > ArgbToAlphaAndColorRef ( FX_ARGB argb)

Definition at line 49 of file fx_dib.cpp.

References ArgbToColorRef().

+ Here is the call graph for this function:

◆ ArgbToColorRef()

FX_COLORREF ArgbToColorRef ( FX_ARGB argb)

Definition at line 53 of file fx_dib.cpp.

References FXSYS_BGR().

Referenced by ArgbToAlphaAndColorRef(), CPDFSDK_Widget::GetBorderColor(), and CPDFSDK_Widget::GetFillColor().

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

◆ CmykEncode()

FX_CMYK CmykEncode ( uint32_t c,
uint32_t m,
uint32_t y,
uint32_t k )
constexpr

Definition at line 105 of file fx_dib.h.

◆ FXSYS_BGR()

uint32_t FXSYS_BGR ( uint8_t b,
uint8_t g,
uint8_t r )
constexpr

Definition at line 69 of file fx_dib.h.

Referenced by ArgbToColorRef().

+ Here is the caller graph for this function:

◆ FXSYS_GetBValue()

uint8_t FXSYS_GetBValue ( uint32_t bgr)
constexpr

Definition at line 81 of file fx_dib.h.

Referenced by AlphaAndColorRefToArgb(), FPDFPageObj_GetFillColor(), FPDFPageObj_GetStrokeColor(), FPDFText_GetFillColor(), and FPDFText_GetStrokeColor().

+ Here is the caller graph for this function:

◆ FXSYS_GetGValue()

uint8_t FXSYS_GetGValue ( uint32_t bgr)
constexpr

Definition at line 77 of file fx_dib.h.

Referenced by AlphaAndColorRefToArgb(), FPDFPageObj_GetFillColor(), FPDFPageObj_GetStrokeColor(), FPDFText_GetFillColor(), and FPDFText_GetStrokeColor().

+ Here is the caller graph for this function:

◆ FXSYS_GetRValue()

uint8_t FXSYS_GetRValue ( uint32_t bgr)
constexpr

Definition at line 73 of file fx_dib.h.

Referenced by AlphaAndColorRefToArgb(), FPDFPageObj_GetFillColor(), FPDFPageObj_GetStrokeColor(), FPDFText_GetFillColor(), and FPDFText_GetStrokeColor().

+ Here is the caller graph for this function:

◆ FXSYS_GetUnsignedAlpha()

unsigned int FXSYS_GetUnsignedAlpha ( float alpha)
constexpr

Definition at line 85 of file fx_dib.h.

Referenced by FPDFPageObj_GetFillColor(), and FPDFPageObj_GetStrokeColor().

+ Here is the caller graph for this function:

◆ GetBppFromFormat()

◆ GetCompsFromFormat()

int GetCompsFromFormat ( FXDIB_Format format)
inline

Definition at line 95 of file fx_dib.h.

Referenced by CFX_ScanlineCompositor::CompositeBitMaskLine(), CFX_ScanlineCompositor::CompositeByteMaskLine(), and CFX_ScanlineCompositor::CompositeRgbBitmapLine().

+ Here is the caller graph for this function:

◆ GetIsMaskFromFormat()

bool GetIsMaskFromFormat ( FXDIB_Format format)
inline

Definition at line 99 of file fx_dib.h.

Referenced by CFX_DIBBase::IsMaskFormat().

+ Here is the caller graph for this function:

◆ MakeRGBFormat()

FXDIB_Format MakeRGBFormat ( int bpp)

Definition at line 23 of file fx_dib.cpp.

References k1bppRgb, k8bppRgb, kInvalid, kRgb, and kRgb32.

◆ ReverseCopy3Bytes()

void ReverseCopy3Bytes ( uint8_t * dest,
const uint8_t * src )
inline

Definition at line 154 of file fx_dib.h.

Referenced by fxcodec::ReverseRGB().

+ Here is the caller graph for this function: