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

Color types and utilities. More...

#include "include.h"
#include "parameters.h"

Go to the source code of this file.

Data Structures

struct  color
 

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
 
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

Color types and utilities.

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

Definition in file color.h.

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

Definition at line 30 of file color.c.

§ color_purest_blue

struct color const color_purest_blue

Maximum intensity blue, no other colors.

Definition at line 44 of file color.c.

§ color_purest_green

struct color const color_purest_green

Maximum intensity green, no other colors.

Definition at line 38 of file color.c.

§ color_purest_red

struct color const color_purest_red

Maximum intensity red, no other colors.

Definition at line 32 of file color.c.