home *** CD-ROM | disk | FTP | other *** search
- { Copyright (C) 1989 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }
-
- program StrokeEllipseDemo ;
-
- { DemoElip - draw ellipse with given radii and }
- { and specified rotation angle }
-
- uses GRAPH ;
-
- {~~~~~~~~~~~~~~~~~~~~ ellipse routines ~~~~~~~~~~~~~~~~~~~~}
-
- {$I conic.pas }
-
- {-$I elipda2.pas }
- {-$I elipdaf.pas }
- {-$I elipdai.pas }
- {-$I elipdam.pas }
- {-$I elipmb.pas }
- {-$I elipmbr.pas }
- {-$I elipra.pas }
- {$I elipra2.pas }
- {-$I elipraf.pas }
- {-$I elipraf2.pas }
- {-$I eliprai2.pas }
- {-$I elipram.pas }
-
- {~~~~~~~~~~~~~~~~~~~~~ main program ~~~~~~~~~~~~~~~~~~~~~~~}
-
- var
- grDriver, grMode : integer ; { graph control parameters }
- a, b : word ; { ellipse radii }
- xc, yc : integer ; { ellipse center }
- ta, tad : single ; { rotation angle }
-
- begin
- { prompt for radius }
- repeat
- write ('Radii: ') ;
- readln (a,b)
- until (a > 0) and (b > 0) ;
- { prompt for rotation angle }
- repeat
- write ('Rotation angle (deg): ') ;
- readln (tad)
- until (tad >= 0.0) and (tad < 360.0) ;
- ta := tad / 180.0 * Pi ;
- { initiate graphics }
- grDriver := Detect ;
- InitGraph(grDriver,grMode,'') ;
- { center of display }
- xc := (GetMaxX + 1) div 2 ;
- yc := (GetMaxY + 1) div 2 ;
- { draw ellipse }
- StrokeEllipse(xc,yc,a,b,ta) ;
- { leak test }
- FloodFill(xc,yc,GetMaxColor) ;
- { pause }
- readln ;
- CloseGraph
- end.
-
- { Copyright (C) 1989 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }