1 ! Copyright (C) 2008 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax kernel quotations ui.gadgets
4 images strings ui.gadgets.worlds ;
7 HELP: <offscreen-world>
9 { "gadget" gadget } { "title" string } { "status" "a boolean" }
10 { "world" offscreen-world }
12 { $description "Constructs an " { $link offscreen-world } " gadget with " { $snippet "gadget" } " as its only child. Generally you should use " { $link open-offscreen } " or " { $link do-offscreen } " instead of calling this word directly." } ;
16 { "world" offscreen-world }
18 { $description "Releases the resources used by the rendering buffer for " { $snippet "world" } "." } ;
22 { "gadget" gadget } { "quot" quotation }
24 { $description "Constructs an " { $link offscreen-world } " around " { $snippet "gadget" } " with " { $link open-offscreen } ", calls " { $snippet "quotation" } " with the world on the top of the stack, and cleans up the world with " { $link close-offscreen } " at the end of " { $snippet "quotation" } "." } ;
31 { $description "Renders " { $snippet "gadget" } " to an " { $link offscreen-world } " and creates an " { $link image } " from its contents." } ;
34 { $class-description "The class of " { $link world } " objects that render to an offscreen buffer." } ;
36 HELP: offscreen-world>bitmap
38 { "world" offscreen-world }
41 { $description "Saves a copy of the contents of " { $snippet "world" } " to a " { $link image } " object." } ;
46 { "world" offscreen-world }
48 { $description "Creates and sets up an " { $link offscreen-world } " with " { $snippet "gadget" } " as its only child." } ;
50 { offscreen-world open-offscreen close-offscreen do-offscreen } related-words
52 ARTICLE: "ui.offscreen" "Offscreen UI rendering"
53 "The " { $vocab-link "ui.offscreen" } " provides words for rendering gadgets to an offscreen buffer so that bitmaps can be made from their contents."
54 { $subsections offscreen-world }
55 "Opening gadgets offscreen:"
61 "Creating bitmaps from offscreen buffers:"
63 offscreen-world>bitmap