Handbook
Glossary
image-part ( image x y w h -- image )
Vocabulary
snake-game
.
sprites
Inputs
image
an
object
x
an
object
y
an
object
w
an
object
h
an
object
Outputs
image
an
object
Definition
USING:
accessors
images
kernel
math
sequences
;
IN:
snake-game.sprites
::
image-part
( image x y w h -- image )
image w h
new-image-like
:>
new-image h
<iota>
[|
i |
new-image
bitmap>>
x y i
+
w image
pixel-row-slice-at
append!
drop
]
each
new-image
;