Handbook
Glossary
selection-rect ( dim line selection -- rect )
Vocabulary
core-text
Inputs
dim
an
object
line
an
object
selection
an
object
Outputs
rect
an
object
Definition
USING:
accessors
core-graphics.types
io.encodings.string
io.encodings.utf16
kernel
locals.backend
math
sequences
;
IN:
core-text
:
selection-rect
( dim line selection -- rect )
[
start>>
]
[
end>>
]
[
string>>
]
tri
3
load-locals
-2
get-local
-1
get-local
0
get-local
[
load-local
0
swap
0
get-local
subseq
utf16n
encode
length
2
/i
1
drop-locals
]
curry
bi@
3
drop-locals
[
f
CTLineGetOffsetForStringIndex
]
bi-curry@
bi
[
drop
nip
0
]
[
swap
-
swap
second
]
3bi
<CGRect>
;