Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Bitmap/PicoLisp/bitmap.l
Normal file
17
Task/Bitmap/PicoLisp/bitmap.l
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Create an empty image of 120 x 90 pixels
|
||||
(setq *Ppm (make (do 90 (link (need 120)))))
|
||||
|
||||
# Fill an image with a given color
|
||||
(de ppmFill (Ppm R G B)
|
||||
(for Y Ppm
|
||||
(map
|
||||
'((X) (set X (list R G B)))
|
||||
Y ) ) )
|
||||
|
||||
# Set pixel with a color
|
||||
(de ppmSetPixel (Ppm X Y R G B)
|
||||
(set (nth Ppm Y X) (list R G B)) )
|
||||
|
||||
# Get the color of a pixel
|
||||
(de ppmGetPixel (Ppm X Y)
|
||||
(get Ppm Y X) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue