ECE4760 - Laser Projector (ipb7, jcc384, pfc38)  1
Raster Laser Projection
color.c File Reference

Projector Output Functions. More...

#include "color.h"

Go to the source code of this file.

Functions

bool color_equal (struct color const a, struct color const b)
 Return true if a and b represent exactly the same color. More...
 

Variables

struct color const color_blank = {0}
 
struct color const color_purest_red
 Maximum intensity red, no other colors. More...
 
struct color const color_purest_green
 Maximum intensity green, no other colors. More...
 
struct color const color_purest_blue
 Maximum intensity blue, no other colors. More...
 

Detailed Description

Projector Output Functions.

Author
Istvan Burbank, Peter Friend, James Cassell
Date
2016-11-28

Definition in file color.c.

Function Documentation

§ color_equal()

bool color_equal ( struct color const  a,
struct color const  b 
)

Return true if a and b represent exactly the same color.

Two structs that represent the same color might not be the same bits because the spec allows "padding" needed to satisfy alignment to contain any value.

Definition at line 71 of file color.c.

72  {
73  return (a.red == b.red) && (a.green == b.green) && (a.blue == b.blue);
74 }

Variable Documentation

§ color_blank

struct color const color_blank = {0}

Definition at line 30 of file color.c.

§ color_purest_blue

struct color const color_purest_blue
Initial value:
= {
.red = 0,
.green = 0,
.blue = 3
}

Maximum intensity blue, no other colors.

Definition at line 44 of file color.c.

§ color_purest_green

struct color const color_purest_green
Initial value:
= {
.red = 0,
.green = 3,
.blue = 0
}

Maximum intensity green, no other colors.

Definition at line 38 of file color.c.

§ color_purest_red

struct color const color_purest_red
Initial value:
= {
.red = 3,
.green = 0,
.blue = 0
}

Maximum intensity red, no other colors.

Definition at line 32 of file color.c.