MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / XChartEsoteric

Function XChartEsoteric

xcharts2.cpp:1029–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027// horizontal, as done when the -7 is combined with the -X switch.
1028
1029void XChartEsoteric()
1030{
1031 real rRay[cRay+2], rRaySav[cRay+2], power1[objMax], power2[objMax],
1032 power[oNorm+1];
1033 char sz[cchSzDef];
1034 int cYea, daytot, d = 1, dd, day, mon, yea, monsiz,
1035 x1, y1, x2, y2, xs, ys, m, n, u, v = 0, i, j, k;
1036
1037 EnsureRay();
1038 cYea = us.nEphemYears; // Is -EY on to do multiple years at once?
1039 if (cYea) {
1040 daytot = 0;
1041 for (i = 0; i < cYea; i++)
1042 daytot += DayInYear(Yea + i);
1043 day = 1; mon = 1; yea = Yea; monsiz = 31;
1044 } else
1045 daytot = DayInMonth(Mon, Yea);
1046 x1 = (3 + Min(cYea, 2))*xFontT; y1 = 6*gi.nScaleTextT2;
1047 x2 = gs.xWin - x1; y2 = gs.yWin - y1;
1048 xs = x2 - x1; ys = y2 - y1;
1049 dd = (daytot / ys + 1) * (2 - us.fSeconds);
1050 dd = Min(dd, 28);
1051
1052 // Label Rays along the top axis.
1053
1054 for (i = 1; i <= cRay+1; i++) {
1055 m = x1 + NMultDiv(xs, i-1, cRay+1);
1056 DrawColor(gi.kiGray);
1057 DrawDash(m, y1, m, y2, 2);
1058 if (i <= cRay)
1059 sprintf(sz, "Ray %d", i);
1060 else
1061 sprintf(sz, "Average");
1062 DrawColor(i <= cRay ? kRayB[i] : gi.kiOn);
1063 DrawSz(sz, x1 + xs*(i-1)/8, gi.nScaleTextT2, dtCent | dtTop | dtScale2);
1064 }
1065
1066 // Loop and display Ray influences for one day segment.
1067
1068 while (d <= daytot + 1) {
1069 n = v;
1070 if (gs.fLabel &&
1071 (cYea ? (mon == Mon && day == 1 && yea == Yea) : (d == Day))) {
1072 // Marker line for specific day.
1073 if (cYea)
1074 v = y1 + NMultDiv(ys, d-2+Day, daytot);
1075 else
1076 v = y1 + NMultDiv(ys, (d-1)*24 + (int)Tim, daytot*24);
1077 DrawColor(kDkCyanB);
1078 DrawLine(x1, v, x2, v);
1079 }
1080 v = y1 + NMultDiv(ys, d-1, daytot);
1081 if (!gs.fEquator && (!cYea || day == 1)) {
1082 // Marker line for day or month.
1083 DrawColor(gi.kiGray);
1084 DrawDash(x1, v, x2, v, cYea <= 1 || mon == 1 ? 1 : 3);
1085 }
1086 if (d > 1)

Callers 1

DrawChartXFunction · 0.85

Calls 7

EnsureRayFunction · 0.85
DayInMonthFunction · 0.85
DrawColorFunction · 0.85
DrawDashFunction · 0.85
DrawSzFunction · 0.85
CastChartFunction · 0.85
ComputeInfluenceFunction · 0.85

Tested by

no test coverage detected