| 2847 | // across the sector) as done when the -l is combined with the -X switch. |
| 2848 | |
| 2849 | void XChartSector() |
| 2850 | { |
| 2851 | real xplanet[objMax], symbol[objMax]; |
| 2852 | byte ignoreSav[objMax], ignoreT[objMax]; |
| 2853 | char sz[3]; |
| 2854 | int nTrans = (int)(gs.rBackPct * 256.0 / 100.0), cx, cy, yi, i, j, k; |
| 2855 | real unitx, unity, px, py, temp; |
| 2856 | flag fOff; |
| 2857 | |
| 2858 | if (gs.fText && gs.fDoSidebar) |
| 2859 | gs.xWin -= xSideT; |
| 2860 | cx = gs.xWin/2 - 1; cy = gs.yWin/2 - 1; |
| 2861 | unitx = (real)cx; unity = (real)cy; |
| 2862 | yi = !us.fIndian ? 1 : -1; |
| 2863 | |
| 2864 | // Draw lines across the whole chart at the four angles. |
| 2865 | DrawColor(gi.kiLite); |
| 2866 | DrawDash(cx+POINT1(unitx, 0.99, PX(0.0)), |
| 2867 | cy+POINT1(unity, 0.99, PY(0.0)), |
| 2868 | cx+POINT1(unitx, 0.99, PX(180.0)), |
| 2869 | cy+POINT1(unity, 0.99, PY(180.0)), !gs.fColor); |
| 2870 | DrawDash(cx+POINT1(unitx, 0.99, PX(90.0)), |
| 2871 | cy+POINT1(unity, 0.99, PY(90.0)), |
| 2872 | cx+POINT1(unitx, 0.99, PX(270.0)), |
| 2873 | cy+POINT1(unity, 0.99, PY(270.0)), !gs.fColor); |
| 2874 | |
| 2875 | // Draw circles and radial lines delineating the 36 sectors. |
| 2876 | DrawColor(gi.kiOn); |
| 2877 | for (i = 0; i < nDegMax; i += 10) { |
| 2878 | px = PX((real)i); py = PY((real)i); |
| 2879 | DrawLine(cx+POINT1(unitx, 0.81, px), cy+POINT1(unity, 0.81, py)*yi, |
| 2880 | cx+POINT2(unitx, 0.95, px), cy+POINT2(unity, 0.95, py)*yi); |
| 2881 | } |
| 2882 | DrawCircle(cx, cy, (int)(unitx*0.95+rRound), (int)(unity*0.95+rRound)); |
| 2883 | DrawCircle(cx, cy, (int)(unitx*0.81+rRound), (int)(unity*0.81+rRound)); |
| 2884 | |
| 2885 | // Label the 36 sectors, with plus zones in red and normal in dark green. |
| 2886 | k = pluszone[cSector]; |
| 2887 | for (i = 1; i <= cSector; i++) { |
| 2888 | j = pluszone[i]; |
| 2889 | DrawColor(j ? kRedB : kDkGreenB); |
| 2890 | fOff = DrawFillWheel(cx+POINT1(unitx, 0.88, PX((real)(i*10+175))), |
| 2891 | cy+POINT1(unity, 0.88, PY((real)(i*10+175)))*yi+gi.nScale, i, 2); |
| 2892 | if (nTrans >= 128) |
| 2893 | DrawColor(fOff ? gi.kiOff : gi.kiOn); |
| 2894 | sprintf(sz, "%d", i); |
| 2895 | DrawSz(sz, cx+POINT1(unitx, 0.88, PX((real)(i*10+175)))+ |
| 2896 | (FBetween(i, 12, 19) ? -gi.nScale : 0), |
| 2897 | cy+POINT1(unity, 0.88, PY((real)(i*10+175)))*yi+gi.nScale, |
| 2898 | dtCent | dtScale); |
| 2899 | sprintf(sz, "%c", j ? '+' : '-'); |
| 2900 | DrawSz(sz, cx+POINT1(unitx, 0.97, PX((real)(i*10+175))), |
| 2901 | cy+POINT1(unity, 0.97, PY((real)(i*10+175)))*yi+gi.nScaleTextT*2, |
| 2902 | dtCent | dtScale2); |
| 2903 | if (j != k) { |
| 2904 | DrawColor(gi.kiGray); |
| 2905 | DrawDash(cx, cy, cx+POINT2(unitx, 0.81, PX((real)(i*10+170))), |
| 2906 | cy+POINT2(unity, 0.81, PY((real)(i*10+170)))*yi, 1); |
no test coverage detected