-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_draw.c
30 lines (28 loc) · 1.23 KB
/
ft_draw.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_draw.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rghouzra <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/19 09:32:57 by rghouzra #+# #+# */
/* Updated: 2022/11/21 15:49:51 by rghouzra ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractal.h"
void ft_draw(t_data *data, int (*function)(t_data *data))
{
data->x = 0;
while (data->x < data->width)
{
data->y = 0;
while (data->y < data->height)
{
my_mlx_pixel_put(data, data->x, data->y, function(data));
data->y++;
}
data->x++;
}
mlx_put_image_to_window(data->ptr->mlx_ptr, data->ptr->mlx_win, \
data->img, 0, 0);
}