KiCad PCB EDA Suite
CCOLORRGB Union Reference

#include <ccolorrgb.h>

Public Member Functions

 CCOLORRGB (const SFVEC3F &aColor)
 
 CCOLORRGB ()
 
 CCOLORRGB (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 35 of file ccolorrgb.h.

Constructor & Destructor Documentation

CCOLORRGB::CCOLORRGB ( const SFVEC3F aColor)

Definition at line 34 of file ccolorrgb.cpp.

References b, g, and r.

35 {
36  r = (unsigned int)glm::clamp( (int)(aColor.r * 255), 0, 255 );
37  g = (unsigned int)glm::clamp( (int)(aColor.g * 255), 0, 255 );
38  b = (unsigned int)glm::clamp( (int)(aColor.b * 255), 0, 255 );
39 }
unsigned char r
Definition: ccolorrgb.h:41
unsigned char g
Definition: ccolorrgb.h:42
unsigned char b
Definition: ccolorrgb.h:43
CCOLORRGB::CCOLORRGB ( )
inline

Definition at line 47 of file ccolorrgb.h.

References b, g, and r.

47 { r = 0; g = 0; b = 0; }
unsigned char r
Definition: ccolorrgb.h:41
unsigned char g
Definition: ccolorrgb.h:42
unsigned char b
Definition: ccolorrgb.h:43
CCOLORRGB::CCOLORRGB ( unsigned char  aR,
unsigned char  aG,
unsigned char  aB 
)
inline

Definition at line 48 of file ccolorrgb.h.

References b, g, and r.

48  { r = aR;
49  g = aG;
50  b = aB; }
unsigned char r
Definition: ccolorrgb.h:41
unsigned char g
Definition: ccolorrgb.h:42
unsigned char b
Definition: ccolorrgb.h:43

Member Data Documentation

struct { ... }
unsigned char CCOLORRGB::b

Definition at line 43 of file ccolorrgb.h.

Referenced by BlendColor(), and CCOLORRGB().

unsigned char CCOLORRGB::c[3]

Definition at line 37 of file ccolorrgb.h.

Referenced by SetPixel().

unsigned char CCOLORRGB::g

Definition at line 42 of file ccolorrgb.h.

Referenced by BlendColor(), and CCOLORRGB().

unsigned char CCOLORRGB::r

Definition at line 41 of file ccolorrgb.h.

Referenced by BlendColor(), and CCOLORRGB().


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