From dada4b12f07388262729a1b979e53e28bfb79db3 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Thu, 23 Jan 2020 18:46:55 +0100 Subject: Nice squares --- src/ft_drawsquare.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/ft_drawsquare.c (limited to 'src/ft_drawsquare.c') diff --git a/src/ft_drawsquare.c b/src/ft_drawsquare.c new file mode 100644 index 0000000..d720f44 --- /dev/null +++ b/src/ft_drawsquare.c @@ -0,0 +1,22 @@ +#include +#include + +void +ft_drawsquare(t_win *wlist, int a, int b) +{ + int x; + int y; + + x = a; + y = b; + while (x > a - 40) + { + while (y > b - 40) + { + mlx_pixel_put(wlist->wlx, wlist->winptr, x, y, 255); + y--; + } + y = b; + x--; + } +} -- cgit v1.2.3