RT
Data Structures | Macros | Typedefs | Functions
color.h File Reference
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for color.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_color
 

Macros

#define SHIFT_RED   16
 
#define SHIFT_GREEN   8
 
#define SHIFT_BLUE   0
 

Typedefs

typedef struct s_color t_color
 

Functions

void color_mult (t_color *color, t_color *mult)
 
t_color color_mult_ (t_color color, t_color mult)
 
void color_scalar (t_color *color, float k)
 
t_color color_scalar_ (t_color color, float k)
 
void color_add (t_color *color, t_color add)
 
t_color color_add_ (t_color color, t_color add)
 
t_color color_sub (t_color color, t_color sub)
 
void color_max (t_color *col1, t_color *col2)
 
void color_clamp (t_color *color, float min, float max)
 
bool color_bool (t_color color)
 
t_color itocolor (int color)
 
int colortoi (t_color color)
 
t_color color_linear_inter (t_color color0, t_color color1, float value)
 

Macro Definition Documentation

◆ SHIFT_BLUE

#define SHIFT_BLUE   0

◆ SHIFT_GREEN

#define SHIFT_GREEN   8

◆ SHIFT_RED

#define SHIFT_RED   16

Typedef Documentation

◆ t_color

typedef struct s_color t_color

Function Documentation

◆ color_add()

void color_add ( t_color color,
t_color  add 
)

◆ color_add_()

t_color color_add_ ( t_color  color,
t_color  add 
)

◆ color_bool()

bool color_bool ( t_color  color)

◆ color_clamp()

void color_clamp ( t_color color,
float  min,
float  max 
)

◆ color_linear_inter()

t_color color_linear_inter ( t_color  color0,
t_color  color1,
float  value 
)

◆ color_max()

void color_max ( t_color col1,
t_color col2 
)

◆ color_mult()

void color_mult ( t_color color,
t_color mult 
)

◆ color_mult_()

t_color color_mult_ ( t_color  color,
t_color  mult 
)

◆ color_scalar()

void color_scalar ( t_color color,
float  k 
)

◆ color_scalar_()

t_color color_scalar_ ( t_color  color,
float  k 
)

◆ color_sub()

t_color color_sub ( t_color  color,
t_color  sub 
)

◆ colortoi()

int colortoi ( t_color  color)

◆ itocolor()

t_color itocolor ( int  color)