Rebol 程式設計/span?
外觀
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]
]