home *** CD-ROM | disk | FTP | other *** search
- /* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
- #include <stdio.h>
- #define EXTERN extern
- #include <typedef.h>
-
-
- main()
- {
- int i;
- double x1,x2,y1,y2,temp;
-
- InitGraphic();
-
- DefineWorld(1, 0., 0., 1000., 1000.);
- SelectWorld(1);
- SelectWindow(1);
- DrawBorder();
-
- for (i = 1; i <= 10; i++) {
- x1 = 50. + 800. * i / 10.;
- x2 = 150. + 800. * i / 10.;
- y1 = 50. + 800. * i / 10.;
- y2 = 150. + 800. * i / 10.;
-
- if (x1 > x2) {
- temp = x1;
- x1 = x2;
- x2 = temp;
- }
-
- if (y1>y2) {
- temp = y1;
- y1 = y2;
- y2 = temp;
- }
-
- DrawSquare((double)x1, (double)y1, (double)x2, (double)y2, FALSE);
- Hatch((double)x1, (double)y1, (double)x2, (double)y2, (double)2. * i);
- }
-
- inkey();
- LeaveGraphic();
- }
-