home *** CD-ROM | disk | FTP | other *** search
- /* file basic.spt */
- /* Demo of a simple drawing using */
- /* some built-in functions */
-
- #include <splot.h>
- main()
- {
- /* draw two boxes */
- box(6.0,20.0,11.0,16.0);
- box(6.5,19.5,8.5,18.0);
- stroke();
- /* draw two circles */
- /* input coordinates with mouse */
- arc(5.95,10.91,2.0,0,360);
- stroke();
- arc(8.96,10.73,1.0,0,360);
- stroke();
- /* draw a triangle */
- moveto(7.0,5.0);
- lineto(9.0,7.0);
- lineto(11.0,5.0);
- lineto(7.0,5.0);
- stroke();
- /* add some text */
- text(4.45,23.22,"Basic Drawing using defaults");
- }
-