BB___PIEFILLED

=PIEFILLED= toc

Description
> For use with graphics windows and graphicboxes, PIEFILLED draws a color-filled pie shape using the pen position as the vertex of the slice. The slice is inscribed within an ellipse w wide by h high.

> The fill color of filled shapes is set with the backcolor command.

> There are four graphics commands that draw filled shapes: >> boxfilled >> circlefilled >> ellipsefilled >> piefilled

Syntax
> //This command is NOT case sensitive.//

Using literal values

 * 1)  - a graphics window
 * 2)  - a graphicbox

Using variable values
> The angle of the slice is measured in degrees. angle1 is the beginning angle based on north being 270 degrees, and angle2 is the number of degrees of sweep. Positive angles sweep clockwise and negative angles sweep counter-clockwise.

To illustrate the angles, suppose you wanted to draw a sweep from 12:00 on the clock face to 1:30. angle1 would be 270 and angle2 would be 45. > code format="lb" code
 * 1) handle.ext "pie 100 50 270 45"

Hints

 * //**Color & Size.**// Shapes are drawn with a pen color set by the command and a line thickness set by the  command. The fill color is set with the  command.

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

WindowWidth=400 WindowHeight=300

open "Piefilled Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put the pen down #g "down; place 100 100" 'draw an ellipse #g "color lightgray; ellipse 100 80"

'draw a pie shape beginning at 3:00 on clockface and 'ending thru a sweep of 112 degrees 'let's make it a blueberry pie #g "backcolor blue" #g "piefilled 100 80 0 112"

'make graphics stick #g "flush"

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 "Draw Piefilled Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put the pen down #g.gb "down; place 100 100" 'draw an ellipse #g.gb "color lightgray; ellipse 100 80"

'draw a pie shape beginning at 3:00 on clockface and 'ending thru a sweep of 112 degrees 'let's make this one a peach pie #g.gb "backcolor 255 195 0" #g.gb "piefilled 100 80 0 112"

'make graphics stick #g.gb "flush"

wait

[quit] close #g end code

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