almost fixing text rendering

This commit is contained in:
kbz_8
2023-04-08 20:45:06 +02:00
parent b4b3bbda54
commit 77d71adc1f
8 changed files with 166 additions and 25 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */
/* Updated: 2023/04/08 00:21:38 by maldavid ### ########.fr */
/* Updated: 2023/04/08 19:04:29 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -73,12 +73,12 @@ int main(void)
void *img;
mlx.mlx = mlx_init();
mlx.win = mlx_new_window(mlx.mlx, 400, 400, "My window");
mlx.win = mlx_new_window(mlx.mlx, 1400, 800, "My window");
mlx.logo = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &w, &h);
mlx_pixel_put(mlx.mlx, mlx.win, 200, 10, 0xFFFF00FF);
mlx_put_image_to_window(mlx.mlx, mlx.win, mlx.logo, 200, 200);
img = create_image(&mlx);
mlx_string_put(mlx.mlx, mlx.win, 0, 0, 0xFFFF0000, "this is a text");
mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFFFF0000, "this is a text");
mlx_put_image_to_window(mlx.mlx, mlx.win, img, 200, 20);
mlx_loop_hook(mlx.mlx, update, &mlx);
mlx_loop(mlx.mlx);