]> gitweb.factorcode.org Git - factor.git/blob - core/ui/paint.facts
ff24e1600709959fce3c29aad823dd07943997f0
[factor.git] / core / ui / paint.facts
1 IN: gadgets
2 USING: help ;
3
4 HELP: clip
5 { $var-description "The current clipping rectangle." } ;
6
7 HELP: draw-gadget*
8 { $values { "gadget" gadget } } 
9 { $contract "Draws the gadget by making OpenGL calls. The top-left corner of the gadget should be drawn at the location stored in the " { $link origin } " variable." }
10 { $notes "This word should not be called directly. To force a gadget to redraw, call " { $link relayout-1 } "." } ;
11
12 HELP: draw-interior
13 { $values { "gadget" gadget } } 
14 { $contract "Draws the interior of a gadget by making OpenGL calls. The " { $link gadget-interior } " slot may be set to objects implementing this generic word." } ;
15
16 HELP: draw-boundary
17 { $values { "gadget" gadget } } 
18 { $contract "Draws the boundary of a gadget by making OpenGL calls. The " { $link gadget-boundary } " slot may be set to objects implementing this generic word." } ;
19
20 HELP: solid
21 { $class-description "A class implementing the " { $link draw-boundary } " and " { $link draw-interior } " generic words to draw a solid outline or a solid fill, respectively. The " { $link solid-color } " slot stores a color specifier." } ;
22
23 HELP: gradient
24 { $class-description "A class implementing the " { $link draw-interior } " generic word to draw a smoothly shaded transition between colors. The " { $link gradient-colors } " slot stores a sequence of color specifiers and the gradient is drawn in the direction given by the " { $link gadget-orientation } " slot of the gadget." } ;
25
26 HELP: polygon
27 { $class-description "A class implementing the " { $link draw-boundary } " and " { $link draw-interior } " generic words to draw a solid outline or a solid filled polygon, respectively. Instances of " { $link polygon } " have two slots:"
28     { $list
29         { { $link polygon-color } " - a color specifier" }
30         { { $link polygon-points } " - a sequence of points" }
31     }
32 } ;
33
34 HELP: <polygon>
35 { $values { "color" "a color specifier" } { "points" "a sequence of points" } }
36 { $description "Creates a new instance of " { $link polygon } "." } ;
37
38 HELP: <polygon-gadget>
39 { $values { "color" "a color specifier" } { "points" "a sequence of points" } }
40 { $description "Creates a gadget which is drawn as a solid filled polygon. The gadget's size is the minimum bounding box containing all the points of the polygon." } ;