Rebol 编程/span?
外观
< Rebol 编程
SPAN? pane /part count
返回所有面的 [最小值 最大值] 范围的块
SPAN? 是一个函数值。
- 窗格 -- (类型:块)
- /part
- 计数 -- 限制面的数量 (类型:整数)
span?: func [
"Returns a block of [min max] bounds for all faces"
pane [block!]
/part count [integer!] "Limit the number of faces"
/local origin margin
][
origin: 100000x100000
margin: 0x0
foreach item pane [
if object? item [
if all [count negative? count: count - 1] [break]
origin: min origin item/offset
margin: max margin item/offset + item/size
]
]
reduce [origin margin]
]