diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-07 10:14:51 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-07 10:14:51 -0700 |
commit | 92fb55d50fbe22c71c4d0214ea9b1efd78828cdf (patch) | |
tree | c64706cc4b5e3bafd31b55c69745d83f7f8d5b5c | |
parent | c651bbeffcd3b840a63ca3ae831e8ba2ec64189b (diff) | |
download | mu-92fb55d50fbe22c71c4d0214ea9b1efd78828cdf.tar.gz |
no, we need hline1 for fill_rect
-rw-r--r-- | shell/data.limg | 18 |
1 files 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) |