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

Function DrawHouse

xgeneral.cpp:1452–1532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1450// Either use a turtle vector, or else write a number in a system font.
1451
1452void DrawHouse(int i, int x, int y)
1453{
1454 int nFont = gs.nFontHou, ch = -1, nScale = 100;
1455 flag fDoThin;
1456#ifdef SVG
1457 char sz[3], *pch;
1458#endif
1459
1460 if (nFont == fiWingding)
1461 ch = 182 + i;
1462 else if (nFont == fiAstronom)
1463 ch = '0' + i;
1464 else if (nFont >= fiArial && gs.ft != ftWmf)
1465 ch = 0x2460 + i - 1;
1466#ifdef EXPRESS
1467 AdjustGlyph(&ch, &x, &y, &nFont, &nScale, i, us.szExpFontHou);
1468 if (!FBetween(nFont, 0, cFont-1))
1469 ch = -1;
1470#endif
1471 fDoThin = gs.fThick && nFont == 0 && ch <= 0 && gi.nScale <= gi.nScaleT;
1472 if (fDoThin)
1473 DrawThick(fFalse);
1474#ifdef WINANY
1475 if (!gi.fFile && ch > 0) {
1476 if (nFont == fiArial)
1477 ch = (i <= 9 ? '0' + i : -i);
1478 if (DrawGlyph(ch, x, y, nFont, nScale))
1479 return;
1480 }
1481#endif
1482#ifdef PS
1483 if (gs.ft == ftPS && nFont > 0 && ch != -1) {
1484 PsFont(nFont);
1485 if (nFont < fiArial)
1486 fprintf(gi.file, "%d %d(%s%c)center\n", x, y, PsEscape(ch), ch);
1487 else
1488 fprintf(gi.file, "%d %d(%d)center\n", x, y, i);
1489 return;
1490 }
1491#endif
1492#ifdef META
1493 if (gs.ft == ftWmf && nFont > 0 && ch != -1) {
1494 gi.nFontDes = nFont;
1495 gi.kiTextDes = gi.kiCur;
1496 gi.nAlignDes = 0x6 | 0x8 /* Center | Bottom */;
1497 MetaSelect();
1498 MetaTextOut(x, y+4*gi.nScale, 1 + (nFont >= fiArial && i > 9));
1499 if (nFont < fiArial)
1500 MetaWord(WFromBB(ch, 0));
1501 else
1502 MetaWord(WFromBB(i > 9 ? '1' : '0'+i, i > 9 ? '0'+i-10 : 0));
1503 return;
1504 }
1505#endif
1506#ifdef SVG
1507 if (gs.ft == ftSVG && nFont > 0 && ch > 0) {
1508 pch = NULL;
1509 if (nFont == fiArial) {

Callers 8

FEvalFunctionFunction · 0.85
DrawWheelFunction · 0.85
XChartHorizonFunction · 0.85
XChartHorizonSkyFunction · 0.85
XChartTelescopeFunction · 0.85
XChartIndianFunction · 0.85
XChartSphereFunction · 0.85
WireChartSphereFunction · 0.85

Calls 9

AdjustGlyphFunction · 0.85
DrawThickFunction · 0.85
DrawGlyphFunction · 0.85
PsFontFunction · 0.85
MetaSelectFunction · 0.85
MetaWordFunction · 0.85
SvgTextFunction · 0.85
AdjustCoordinatesFunction · 0.85
DrawTurtleFunction · 0.85

Tested by

no test coverage detected