BB___FILL

=FILL= toc

Description
> For use with graphics windows and graphicboxes, FILL colors the entire window or graphicbox. Fill will cover over any graphics currently displayed.

> There are three graphics commands that deal with color: >> color >> backcolor >> fill

Syntax
> //Color commands are NOT case sensitive.// > Color can be specified using any one of the standard system colors or using the RGB pure color method. See colors. e.g.: > code format="lb" 'using a variable for value of color color$="darkgray" rgb$="155 30 155" code
 * 1)  - a graphics window
 * 2)  - a graphicbox
 * 1) handle.ext "backcolor cyan"
 * 2) handle.ext "backcolor 127 0 127"
 * 1) handle.ext "color "; color$
 * 2) handle.ext "color "; rgb$

Hints
> Color set with color commands can be changed with each new graphic command. Run this example: code format="lb" nomainwin

WindowWidth=400 WindowHeight=300

graphicbox #g.gb1 0, 0, 182, 245 graphicbox #g.gb2 182, 0, 180, 245 open "Change Colors Demo" for graphics as #g #g "trapclose [quit]"

#g.gb1 "fill yellow" #g.gb2 "fill cyan" wait [quit] close #g end code

Example
An example of the command in a graphics window. code format="lb" nomainwin

WindowWidth=400 WindowHeight=300

open "Fill Demo" for graphics as #g #g "trapclose [quit]"

'fill window with color #g "fill 0 127 255" wait

[quit] close #g end code

An example of the command in a graphicbox. code format="lb" nomainwin

WindowWidth=400 WindowHeight=300

graphicbox #g.gb 2, 2, 390, 270 open "Fill Demo" for graphics_nf_nsb as #g #g "trapclose [quit]"

'fill graphicbox with color #g.gb "fill cyan" wait

[quit] close #g end

code

An example combining all three color commands in a graphics window. code format="lb" nomainwin

WindowWidth=400 WindowHeight=300

open "All Color Demo" for graphics as #g #g "trapclose [quit]"

'fill window with color #g "fill cyan" 'set the pen color #g "color red" 'set the backcolor #g "backcolor yellow" 'put the pen down and place it in the center of the window #g "down; home" 'draw a filled circle #g "circlefilled 40" 'draw some text #g "place 20 20;\The cyan window color is set by FILL command." #g "\\The red text color and the red outline of the circle" #g "\is set with the COLOR command." #g "place 20 200;\The circle is filled with the BACKCOLOR yellow." #g "place 20 230;\The color behind the text is the BACKCOLOR yellow." #g "flush" 'make graphics stick wait

[quit] close #g end code

Useful Functions
code format="lb" Place a useful function using this keyword here code