Handbook
Glossary
(pack-stripe) ( image-placements atlas-width @y -- stripe-height/f )
Vocabulary
images
.
atlas
.
private
Inputs
image-placements
an
object
atlas-width
an
object
@y
an
object
Outputs
stripe-height/f
an
object
Definition
USING:
accessors
kernel
math
math.order
sequences
;
IN:
images.atlas.private
::
(pack-stripe)
( image-placements atlas-width @y -- stripe-height/f )
0
:>
@x!
f
:>
stripe-height! image-placements
[|
ip |
ip
loc>>
[
ip
image>>
dim>>
:>
dim stripe-height
[
dim
height
stripe-height 0
or
max
stripe-height!
]
unless
dim
width
:>
w atlas-width w @x
+
>=
[
ip
{
@x @y
}
>>loc
drop
@x w
+
@x!
]
when
]
unless
]
each
stripe-height
;