Handbook
Glossary
max-col-widths ( canvas rows -- widths )
Vocabulary
pdf
.
layout
Inputs
canvas
an
object
rows
an
object
Outputs
widths
an
object
Definition
USING:
accessors
assocs
kernel
math
math.order
sequences
sequences.extras
sorting
;
IN:
pdf.layout
::
max-col-widths
( canvas rows -- widths )
H{
}
clone
:>
widths rows
[
cells>>
canvas
swap
col-widths
[
widths
[
0
or
max
]
change-at
]
each-index
]
each
widths
sort-keys
values
dup
sum
dup
450
>
[
over
first
150
<
[
drop
dup
unclip-slice
over
sum
swap
450
swap
-
swap
/
[
*
]
curry
map!
drop
]
[
450
swap
/
[
*
]
curry
map
]
if
]
[
450
swap
[-]
[
+
]
curry
dupd
change-last
]
if
;