B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
14
Task/Bitmap/Scheme/bitmap-2.ss
Normal file
14
Task/Bitmap/Scheme/bitmap-2.ss
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(define (make-image columns rows)
|
||||
(if (= rows 0)
|
||||
(list)
|
||||
(cons (make-list columns (list)) (make-image columns (- rows 1)))))
|
||||
|
||||
(define (image-fill! image colour)
|
||||
(if (not (null? image))
|
||||
(begin (list-fill! (car image) colour) (image-fill! (cdr image) colour))))
|
||||
|
||||
(define (image-set! image column row colour)
|
||||
(list-set! (list-get image row) column colour))
|
||||
|
||||
(define (image-get image column row)
|
||||
(list-get (list-get image row) column))
|
||||
Loading…
Add table
Add a link
Reference in a new issue