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>
-
-
- void OnePieDem()
- {
- extern char *strcpy();
-
- double sum,x1,y1,Radius,Theta,InRadius,OutRadius;
- int n,Mode,Size;
- PieArray a;
- int back;
- int ch;
-
- ClearScreen();
- SetColorWhite();
-
- DefineWindow(1,0,0,XMaxGlb,YMaxGlb);
- DefineHeader(1,"A SINGLE PIE CHART");
- DefineWorld(1, 0., 0., 1000., 1000.);
- SelectWorld(1);
- SelectWindow(1);
- SetHeaderOn();
- SetBackground(0);
- DrawBorder();
-
- n = 5;
- a[0].area = 25;
- a[1].area = 17.5;
- a[2].area = 9.6;
- a[3].area = 21;
- a[4].area = 35;
- strcpy(a[0].text, "JAN.=");
- strcpy(a[1].text, "FEB.=");
- strcpy(a[2].text, "MAR.=");
- strcpy(a[3].text, "APR.=");
- strcpy(a[4].text, "MAY=");
-
- a[0].area = -a[0].area;
-
- x1 = 500.;
- y1 = 500.;
-
- Radius = 200.;
- Theta = 60.;
-
- SetAspect(1.0);
-
- InRadius = 0.7;
- OutRadius = 1.25;
-
- Mode = 2;
- Size = 2;
-
- DrawPolarPie(x1,y1,Radius,Theta,InRadius,OutRadius,a,n,Mode,Size);
- }
-
-
-
- main()
- {
- InitGraphic();
- OnePieDem();
- inkey();
- LeaveGraphic();
- }
-