-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_my_put_pixel.c
22 lines (19 loc) · 1.09 KB
/
ft_my_put_pixel.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_my_put_pixel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zrabhi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/09 10:36:21 by zrabhi #+# #+# */
/* Updated: 2022/04/10 01:56:41 by zrabhi ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void ft_my_put_pixel(t_fractol *data, int x, int y, int color)
{
char *dst;
dst = data->img.addr + (y * data->img.line_length + x * \
(data->img.bits_per_pixel / 8));
*(unsigned int *)dst = color;
}