Last modified on 13 November 2012, at 10:49

REBOL Programming/span?

USAGE:Edit

SPAN? pane /part count 

DESCRIPTION:Edit

Returns a block of [min max] bounds for all faces

SPAN? is a function value.

ARGUMENTSEdit

  • pane -- (Type: block)

REFINEMENTSEdit

  • /part
    • count -- Limit the number of faces (Type: integer)

SOURCE CODEEdit

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]
]