Handbook
Glossary
render ( line -- line image )
Vocabulary
core-text
Inputs
line
an
object
Outputs
line
an
object
image
an
object
Definition
USING:
accessors
arrays
combinators
core-graphics
core-graphics.types
kernel
math
math.vectors
sequences
;
IN:
core-text
::
render
( line -- line image )
line
line>>
:>
ctline line
string>>
:>
string line
font>>
:>
font line
render-loc>>
[
ctline
line-rect
:>
rect rect
origin>>
CGPoint>loc
:>
(loc) rect
size>>
CGSize>dim
:>
(dim) (loc)
vfloor
:>
loc (dim)
vceiling
:>
dim dim
[
>integer
1
+
]
map
:>
ext loc line
render-loc<<
dim line
render-dim<<
ext line
render-ext<<
line
metrics>>
loc dim
line-loc
line
loc<<
]
unless
line
render-loc>>
:>
loc line
render-dim>>
:>
dim line
render-ext>>
:>
ext line ext
[
{
[
font ext
fill-background
]
[
loc
first
0
2array
dim
first
ext
second
2array
ctline string
fill-selection-background
]
[
loc
set-text-position
]
[
[
ctline
]
dip
CTLineDraw
]
}
cleave
]
make-bitmap-image
load-2x?
>>2x?
;