Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/make-face

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

USAGE: MAKE-FACE style /styles ss /clone /size wh /spec blk /offset xy /keep DESCRIPTION: Make a face from a given style name or example face. MAKE-FACE is a function value. ARGUMENTS: style -- A name or a face (Type: word object) REFINEMENTS: /styles ss -- Stylesheet (Type: any) /clone -- Copy all primary facets /size wh -- Size of face (Type: pair) /spec blk -- Spec block (Type: block) /offset xy -- Offset of face (Type: pair) /keep -- Keep style related data SOURCE CODE make-face: func [ {Make a face from a given style name or example face.} style [word! object!] "A name or a face" /styles ss "Stylesheet" /clone "Copy all primary facets" /size wh [pair!] "Size of face" /spec blk [block!] "Spec block" /offset xy [pair!] "Offset of face" /keep "Keep style related data" ][ if word? style [style: either styles [select ss style] [get-style style]] if none? style [return none] spec: [parent-face: saved-area: line-list: old-offset: old-size: none] if blk [spec: append copy spec blk] style: make style spec if size [style/size: wh] if offset [style/offset: xy] style/flags: exclude style/flags state-flags if clone [ foreach word [text effect colors texts font para edge] [ if style/:word [ set in style word either series? style/:word [copy style/:word] [ make style/:word [] ] ] ] ] do bind style/init in style 'init if not keep [ style/init: copy [] style/facets: none ] style ]