Handbook
Glossary
visible-tile-offsets ( line rect/f -- offsets )
Vocabulary
ui
.
text
.
core-text
.
private
Inputs
line
an
object
rect/f
an
object
Outputs
offsets
an
object
Definition
USING:
accessors
core-text
kernel
math
math.functions
math.rectangles
math.vectors
opengl
ranges
sequences
;
IN:
ui.text.core-text.private
::
visible-tile-offsets
( line rect/f -- offsets )
line
prepare-render
{
0 0
}
line
render-ext>>
<rect>
:>
bounds rect/f
[
rect/f
rect-extent
[
[
gl-scale
]
map
line
loc>>
v-
]
bi@
<extent-rect>
bounds
rect-intersect
]
[
bounds
]
if
:>
visible visible
dim>>
[
0
<=
]
any?
[
{
}
]
[
visible
rect-extent
[
text-tile-dim
v/
[
floor
>integer
]
map
]
[
text-tile-dim
v/
[
ceiling
>integer
]
map
]
bi*
[
[a..b)
]
2map
first2
cartesian-product
concat
[
text-tile-dim
v*
]
map
]
if
;