KiCad PCB EDA Suite
COLOR_RGB Union Reference

#include <color_rgb.h>

Public Member Functions

 COLOR_RGB (const SFVEC3F &aColor)
 
 COLOR_RGB ()
 
 COLOR_RGB (unsigned char aR, unsigned char aG, unsigned char aB)
 

Public Attributes

unsigned char c [3]
 
struct {
   unsigned char   r
 
   unsigned char   g
 
   unsigned char   b
 
}; 
 

Detailed Description

Definition at line 34 of file color_rgb.h.

Constructor & Destructor Documentation

◆ COLOR_RGB() [1/3]

COLOR_RGB::COLOR_RGB ( const SFVEC3F aColor)

Definition at line 33 of file color_rgb.cpp.

34{
35 r = (unsigned int) glm::clamp( (int) ( aColor.r * 255 ), 0, 255 );
36 g = (unsigned int) glm::clamp( (int) ( aColor.g * 255 ), 0, 255 );
37 b = (unsigned int) glm::clamp( (int) ( aColor.b * 255 ), 0, 255 );
38}
unsigned char g
Definition: color_rgb.h:41
unsigned char r
Definition: color_rgb.h:40
unsigned char b
Definition: color_rgb.h:42

References b, g, and r.

◆ COLOR_RGB() [2/3]

COLOR_RGB::COLOR_RGB ( )
inline

Definition at line 46 of file color_rgb.h.

46{ r = 0; g = 0; b = 0; }

References b, g, and r.

◆ COLOR_RGB() [3/3]

COLOR_RGB::COLOR_RGB ( unsigned char  aR,
unsigned char  aG,
unsigned char  aB 
)
inline

Definition at line 47 of file color_rgb.h.

48 {
49 r = aR;
50 g = aG;
51 b = aB;
52 }

References b, g, and r.

Member Data Documentation

◆ 

struct { ... } COLOR_RGB::@1

◆ b

unsigned char COLOR_RGB::b

Definition at line 42 of file color_rgb.h.

Referenced by BlendColor(), and COLOR_RGB().

◆ c

unsigned char COLOR_RGB::c[3]

Definition at line 36 of file color_rgb.h.

Referenced by SetPixel().

◆ g

unsigned char COLOR_RGB::g

Definition at line 41 of file color_rgb.h.

Referenced by BlendColor(), and COLOR_RGB().

◆ r

unsigned char COLOR_RGB::r

Definition at line 40 of file color_rgb.h.

Referenced by BlendColor(), and COLOR_RGB().


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