From 92fb55d50fbe22c71c4d0214ea9b1efd78828cdf Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 7 May 2021 10:14:51 -0700 Subject: no, we need hline1 for fill_rect --- shell/data.limg | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/shell/data.limg b/shell/data.limg index c2a7805c..dd40fbdc 100644 --- a/shell/data.limg +++ b/shell/data.limg @@ -7,15 +7,17 @@ (let . [(mac let (var val . body) `((fn (,var) ,@body) ,val))]) (hline . [(def hline (fn (screen y color) - (let (x xmax) `(0 ,(width screen)) - (while (< x xmax) - (pixel screen x y color) - (set x (+ x 1))))))]) + (hline1 screen y 0 (width screen) color)))]) + (hline1 . [(def hline1 (fn (screen y x xmax color) + (while (< x xmax) + (pixel screen x y color) + (set x (+ x 1)))))]) (vline . [(def vline (fn (screen x color) - (let (y ymax) `(0 ,(height screen)) - (while (< y ymax) - (pixel screen x y color) - (set y (+ y 1))))))]) + (vline1 screen x 0 (height screen) color)))]) + (vline1 . [(def vline1 (fn (screen x y ymax color) + (while (< y ymax) + (pixel screen x y color) + (set y (+ y 1)))))]) (fill_rect . [(def fill_rect (fn (screen x1 y1 x2 y2 color) (while (< y1 y2) (hline1 screen y1 x1 x2 color) -- cgit 1.4.1-2-gfad0