Handbook
Glossary
prepare-render ( line -- )
Vocabulary
core-text
Inputs
line
an
object
Outputs
None
Definition
USING:
accessors
arrays
colors
core-graphics.types
fonts
kernel
math
math.vectors
sequences
;
IN:
core-text
::
prepare-render
( line -- )
line
render-loc>>
[
line
line>>
line-rect
:>
rect rect
origin>>
CGPoint>loc
:>
(loc) rect
size>>
CGSize>dim
:>
(dim) line
string>>
selection?
line
font>>
background>>
>rgba
alpha>>
zero?
not
or
[
(loc) 0 line
metrics>>
descent>>
neg
2array
vmin
(loc) (dim)
v+
line
metrics>>
[
width>>
]
[
ascent>>
]
bi
2array
vmax
]
[
(loc) (loc) (dim)
v+
]
if
[
vfloor
{
1 1
}
v-
]
[
vceiling
{
1 1
}
v+
]
bi*
:>
( loc end ) end loc
v-
[
>integer
]
map
:>
ext ext
{
1 1
}
v-
:>
dim loc line
render-loc<<
dim line
render-dim<<
ext line
render-ext<<
line
metrics>>
loc dim
line-loc
line
loc<<
]
unless
;