Blender  V3.3
Public Member Functions | Public Attributes | List of all members
Color32 Class Reference

#include <Color.h>

Public Member Functions

 Color32 ()
 
 Color32 (const Color32 &)=default
 
 Color32 (unsigned char R, unsigned char G, unsigned char B)
 
 Color32 (unsigned char R, unsigned char G, unsigned char B, unsigned char A)
 
 Color32 (unsigned int U)
 
void setRGBA (unsigned char R, unsigned char G, unsigned char B, unsigned char A)
 
void setBGRA (unsigned char B, unsigned char G, unsigned char R, unsigned char A=0xFF)
 
 operator unsigned int () const
 

Public Attributes

union {
   struct {
      unsigned char   b
 
      unsigned char   g
 
      unsigned char   r
 
      unsigned char   a
 
   } 
 
   unsigned int   u
 
}; 
 

Detailed Description

32 bit color stored as BGRA.

Definition at line 19 of file Color.h.

Constructor & Destructor Documentation

◆ Color32() [1/5]

Color32::Color32 ( )
inline

Definition at line 21 of file Color.h.

◆ Color32() [2/5]

Color32::Color32 ( const Color32 )
default

◆ Color32() [3/5]

Color32::Color32 ( unsigned char  R,
unsigned char  G,
unsigned char  B 
)
inline

Definition at line 26 of file Color.h.

References B, G, R, and setRGBA().

◆ Color32() [4/5]

Color32::Color32 ( unsigned char  R,
unsigned char  G,
unsigned char  B,
unsigned char  A 
)
inline

Definition at line 30 of file Color.h.

References A, B, G, R, and setRGBA().

◆ Color32() [5/5]

Color32::Color32 ( unsigned int  U)
inline

Definition at line 48 of file Color.h.

Member Function Documentation

◆ operator unsigned int()

Color32::operator unsigned int ( ) const
inline

Definition at line 68 of file Color.h.

References u.

◆ setBGRA()

void Color32::setBGRA ( unsigned char  B,
unsigned char  G,
unsigned char  R,
unsigned char  A = 0xFF 
)
inline

Definition at line 60 of file Color.h.

References A, a, B, b, G, g, R, and r.

◆ setRGBA()

void Color32::setRGBA ( unsigned char  R,
unsigned char  G,
unsigned char  B,
unsigned char  A 
)
inline

Definition at line 52 of file Color.h.

References A, a, B, b, G, g, R, and r.

Referenced by Color32().

Member Data Documentation

◆ 

union { ... }

◆ a

unsigned char Color32::a

◆ b

unsigned char Color32::b

◆ g

unsigned char Color32::g

◆ r

unsigned char Color32::r

◆ u

unsigned int Color32::u

Definition at line 77 of file Color.h.

Referenced by ColorBlock::init(), ColorBlock::isSingleColor(), and operator unsigned int().


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