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

Function DrawSidebar

xcharts0.cpp:264–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262// flag is off, in which case none of the things here are done.
263
264void DrawSidebar()
265{
266 char sz[cchSzDef], *pch, *pch2;
267 ET et;
268 int i, j, k, l, y, a, s, rays, nSav;
269 real r;
270 flag fSav;
271
272 // Decorate the chart a little.
273
274 if (!gs.fIndianWheel) {
275 if (gs.nDecaType == 1) {
276
277 // If decoration value 1, draw spider web lines in each corner.
278 DrawColor(gs.kiDeca < kMax ? gs.kiDeca : gi.kiGray);
279 j = gs.nDecaLine + 1;
280 k = gs.yWin * gs.nDecaSize / 100;
281 l = gs.xWin * gs.nDecaSize / 100;
282 for (y = 0; y <= 1; y++)
283 for (i = 0; i <= 1; i++)
284 for (a = 1; a < j; a++)
285 DrawLine(i*(gs.xWin-1), y ? (gs.yWin-1-a*k/j) : a*k/j,
286 i ? gs.xWin-1-l+a*l/j : l-a*l/j, y*(gs.yWin-1));
287 } else if (gs.nDecaType == 2) {
288 // If decoration value 2, draw a moire pattern in each corner.
289 k = gs.yWin * gs.nDecaSize / 200;
290 l = gs.xWin * gs.nDecaSize / 200;
291 fSav = gs.fThick;
292 DrawThick(fFalse);
293 for (y = 0; y <= 1; y++)
294 for (i = 0; i <= 1; i++)
295 for (s = 0; s <= 1; s++)
296 for (a = 1, j = 1; a < (s ? l : k)*2; a += gi.nScaleT, j++) {
297 DrawColor(FOdd(j) ? (gs.kiDeca < kMax ? gs.kiDeca : gi.kiGray) :
298 gi.kiOff);
299 DrawLine(i ? gs.xWin-1-l : l, y ? gs.yWin-1-k : k,
300 s ? (i ? gs.xWin-1-a : a) : i*(gs.xWin-1),
301 s ? y*(gs.yWin-1) : (y ? gs.yWin-1-a : a));
302 }
303 DrawThick(fSav);
304 }
305
306 // Print dominant Ray(s) in upper left corner of wheel.
307 else if (FBetween(gs.nDecaType, 3, 5)) {
308 nSav = gs.nScaleText;
309 if (gs.nDecaType <= 4) {
310 gs.nScaleText = (gs.yWin / 80 / gi.nScaleT) * 50;
311 if (gs.nScaleText >= 100) {
312 AdjustTextScale();
313 rays = ChartEsoteric(fTrue);
314 sprintf(sz, "Ray %d", rays/10);
315 DrawColor(kRayB[rays/10]);
316 DrawSz(sz, 7*gi.nScaleT, 7*gi.nScaleT, dtLeft | dtTop | dtScale2);
317 if (gs.nDecaType >= 4) {
318 sprintf(sz, ",%d", rays%10);
319 DrawColor(kRayB[rays%10]);
320 DrawSz(sz, 7*gi.nScaleT + 5*xFontT, 7*gi.nScaleT,
321 dtLeft | dtTop | dtScale2);

Callers 7

XChartWheelFunction · 0.85
XChartSectorFunction · 0.85
xcharts1.cppFile · 0.85
XChartIndianFunction · 0.85
XChartSphereFunction · 0.85
XChartWheelRelationFunction · 0.85
XChartWheelMultiFunction · 0.85

Calls 15

DrawColorFunction · 0.85
DrawThickFunction · 0.85
ChartEsotericFunction · 0.85
DrawSzFunction · 0.85
InterpretEsotericFunction · 0.85
ExpSetNFunction · 0.85
NExpGetFunction · 0.85
DrawGlyphFunction · 0.85
DrawPrintFunction · 0.85
DrawInfoFunction · 0.85
PchFormatExpressionFunction · 0.85
PchFormatStringFunction · 0.85

Tested by

no test coverage detected