home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / turbo5 / bgiexamp.arc / FILLELLI.PAS < prev    next >
Pascal/Delphi Source File  |  1988-08-29  |  480b  |  24 lines

  1. { Example for FillEllipse }
  2.  
  3. uses
  4.   Graph;
  5. const
  6.   R = 30;
  7. var
  8.   Driver, Mode : Integer;
  9.   Xasp, Yasp : Word;
  10. begin
  11.   Driver := Detect;                    { Put in graphics mode }
  12.   InitGraph(Driver, Mode, '');
  13.   if GraphResult < 0 then
  14.     Halt(1);
  15.  
  16.   FillEllipse(GetMaxX div 2, GetMaxY div 2, 50, 50); { draw ellipse }
  17.  
  18.   GetAspectRatio(Xasp, Yasp);
  19.   FillEllipse(R, R, R, R * LongInt(Xasp) div Yasp);  { circular ellipse }
  20.  
  21.   Readln;
  22.   Closegraph;
  23. end.
  24.