Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> fillshape fill graphic shape with color pp 175</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILLSHAPE              Fill Graphic Shape With Color                 pp 175

 Syntax:  FillShape (X,Y,FillColor,BorderColor) ;

 Type:    Integer

 Form:    Extended Graphics Procedure

 Purpose: Fill graphic shape with Color.

 Notes:   Requires {$I Graph.P} include file in the source file.
          The Integer expression Color is 0..3 is selected from the color
          palette.  ColorTable is not implemented.  The shape must be entirely
          enclosed by BorderColor or else FillShape will spill out of the
          shape and flood the entire screen.

          X and Y are coordinates inside the shape to be filled.

 Usage:
          {$I Graph.P}                    { Extended graphics support }
       CONST
          X      : Integer = 160      ;   { 270 start position        }
          Y      : Integer = 100      ;   { mid screen position       }
          Radius : Integer =  50      ;   { 50 pixels radius          }
          Border : Integer =   2      ;   { Red                       }
          Fill   : Integer =   3      ;   { Green                     }

       BEGIN
          GraphColorMode              ;   { Set 320x200 graphics mode }
          Circle (X,Y,Radius,Border)  ;   { Draw circle mid screen    }
          FillShape (X,Y,Fill,Border) ;   { Fill circle with color    }
       END.

See Also: FillPattern FillScreen Palette

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson