REBOL Programming/resize-face

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

RESIZE-FACE face size /x /y /no-show 

DESCRIPTION:[edit]

Resize a face.

RESIZE-FACE is a function value.

ARGUMENTS[edit]

  • face -- (Type: any)
  • size -- (Type: number pair)

REFINEMENTS[edit]

  • /x -- Resize only width
  • /y -- Resize only heigth
  • /no-show -- Do not show change yet

SOURCE CODE[edit]

resize-face: func [
    "Resize a face." 
    face 
    size [number! pair!] 
    /x "Resize only width" 
    /y "Resize only heigth" 
    /no-show "Do not show change yet" 
    /local access
][
    if all [
        access: get in face 'access 
        in access 'resize-face*
    ] [
        access/resize-face* face size x y
    ] 
    if not no-show [show face] 
    face
]