int ft_move(t_env *env) { env->adr = mlx_new_image(env->mlx, env->win_h, env->win_l); env->img = mlx_get_data_addr(env->adr, &env->bpp, &env->sl, &env->endian); ft_fractal(env); mlx_put_image_to_window(env->mlx, env->win, env->adr, 0, 0); mlx_string_put(env->mlx, env->win, 50, 5, 0xff0000, "zoom:"); mlx_string_put(env->mlx, env->win, 50, 30, 0xff0000, ft_itoa(env->zoom)); mlx_string_put(env->mlx, env->win, 390, 30, 0xff0000, ft_itoa(env->imax)); mlx_string_put(env->mlx, env->win, 390, 5, 0xff0000, "iteration:"); return (0); }
int draw(t_env env) { int color; int pixel; int x; int y; y = 0; while (y < H) { x = 0; while (x < W) { pixel = ft_fractal(env, x, y); color = color_get(pixel, env); pixel_put(env, x, y, color); x++; } y++; } mlx_put_image_to_window(env.mlx, env.win, env.img.ptr, 0, 0); display(env); return (0); }
int main(int ac, char **av) { ft_arg_error(ac, av[1]); ft_fractal(ft_arg_select(av[1])); return (0); }