home *** CD-ROM | disk | FTP | other *** search
- { Copyright (C) 1989 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }
-
- procedure StrokeCircle ( xc, yc : integer ; r : word ) ;
-
- { CircRAS - draw circular point constellation using }
- { rotation angle method and `strange' angle }
- { step }
-
- var
- Color : word ; { default color }
- ixar,iyar : word ; { aspect ratio parameters }
- iar : longint ; { aspect ratio B16 }
- ida : integer ; { loop control }
- it,ix,iy : longint ; { coordinate variables B22 }
-
- begin
- { constraint test }
- if r < 504 then begin
- { aspect ratio }
- Color := GetColor ;
- GetAspectRatio(ixar,iyar) ;
- iar := SwapLong(longint(ixar)) div longint(iyar) ;
- { prescale and offset }
- ix := SwapLong(r shl 6 + idr) ;
- iy := 0 ;
- { circle }
- for ida := 1 to r do begin
- { rotate coordinates }
- it := (iy div 16 + ix) div 8 - iy ;
- iy := (-ix div 16 + iy) div 8 + ix ;
- ix := it ;
- { apply aspect ratio }
- PutPixel(xc+RoundScaleB6(LongHi(ix)),
- yc+RoundScaleB6(LongHi(LongHi(iy)*iar)),Color)
-
- end
- end
- end ;
-
- { Copyright (C) 1989 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }