15void init_color(
t_clr *color,
int start_color,
int end_color)
17 color->start_r = (start_color >> 16) & 0xFF;
18 color->start_g = (start_color >> 8) & 0xFF;
19 color->start_b = start_color & 0xFF;
20 color->end_r = (end_color >> 16) & 0xFF;
21 color->end_g = (end_color >> 8) & 0xFF;
22 color->end_b = end_color & 0xFF;
25static int less_than(
int a,
int b)
35 plot->px = line->x_start;
36 plot->py = line->y_start;
37 plot->dx = ft_abs(line->x_end - line->x_start);
38 plot->dy = ft_abs(line->y_end - line->y_start);
39 plot->sx = less_than(line->x_start, line->x_end);
40 plot->sy = less_than(line->y_start, line->y_end);
41 plot->err = plot->dx - plot->dy;