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> circle draw a circle pp 173</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CIRCLE                         Draw a Circle                         pp 173

 Syntax:  Circle (X,Y,Radius,Color) ;

 Type:    Integer

 Form:    Extended Graphics Procedure

 Purpose: Draw a circle specified by Color at X,Y coordinates with Radius.

 Notes:   Requires {$I Graph.P} include file in the source file.
          The radius is the same in both horizontal and vertical axes.
          In 320 x 200 mode, this draws a perfect circle.  In 640 x 200 mode
          the circle appears as an ellipse.

          If Color is 0..3 the pen color is selected from the pallette.
          If Color is -1 then pen color is selected from the translation
          table defined by the ColorTable procedure.

 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           }
          Color  : Integer =   2    ;     { Red                        }

       BEGIN
          GraphColorMode            ;      { Set 320x200 graphics mode }
          Circle (X,Y,Radius,Color) ;      { Draw circle mid screen    }
       END.

See Also: Arc ColorTable FillShape GraphColorMode

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