-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_pixel_to_image.c
22 lines (19 loc) · 1.1 KB
/
ft_pixel_to_image.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_pixel_to_image.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vcastilh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 18:36:52 by vcastilh #+# #+# */
/* Updated: 2022/02/21 04:26:21 by vcastilh ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void ft_pixel_to_image(t_fractal *fractal, int i, int j, int clr)
{
unsigned int *p;
p = (unsigned int *)&fractal->mlx.img_addr[(i * fractal->mlx.line_size
+ (j * (fractal->mlx.bpp / 8)))];
*p = clr;
}