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

Function DrawSpot

xgeneral.cpp:276–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274// Draw dot a little larger than just a single pixel at specified location.
275
276void DrawSpot(int x, int y)
277{
278 int n;
279
280 if (gi.fFile) {
281#ifdef PS
282 if (gs.ft == ftPS) {
283 PsLineWidth(gi.nLineWid*3);
284 DrawPoint(x, y);
285 PsLineWidth(gi.nLineWid/3);
286 return;
287 }
288#endif
289#ifdef META
290 if (gs.ft == ftWmf) {
291 gi.kiLineDes = gi.kiFillDes = gi.kiCur;
292 MetaSelect();
293 n = gi.nPenWid*(3 + gs.fThick);
294 MetaEllipse(x-gi.nPenWid*2, y-gi.nPenWid*2, x+n, y+n);
295 return;
296 }
297#endif
298#ifdef SVG
299 if (gs.ft == ftSVG) {
300 SvgSetColor();
301 fprintf(gi.file, "<circle r=\"%d\" cx=\"%d\" cy=\"%d\" fill=\"%s\"/>\n",
302 SVGMUL, x, y, SzColorHTML(gi.kiSvgAct));
303 return;
304 }
305#endif
306#ifdef WIRE
307 if (gs.ft == ftWire) {
308 WireLine(x-1, y, 0, x+1, y, 0);
309 WireLine(x, y-1, 0, x, y+1, 0);
310 return;
311 }
312#endif
313 }
314#ifdef WIN
315 else if (wi.nScaleWin > 1) {
316 n = gi.nScaleT + gs.fThick*(gi.nScaleT >> 2);
317 DrawCircle(x, y, n, n);
318 DrawPoint(x, y);
319 return;
320 }
321#endif
322 DrawPoint(x, y);
323 DrawPoint(x, y-1);
324 DrawPoint(x-1, y);
325 DrawPoint(x+1, y);
326 DrawPoint(x, y+1);
327}
328
329
330// Draw a filled in block, defined by the corners of its rectangle.

Callers 9

FEvalFunctionFunction · 0.85
DrawStarFunction · 0.85
DrawSymbolRingFunction · 0.85
DrawObjectsFunction · 0.85
xcharts0.cppFile · 0.85
XChartAstroGraphFunction · 0.85
XChartTelescopeFunction · 0.85
XChartLocalFunction · 0.85
XChartSphereFunction · 0.85

Calls 6

PsLineWidthFunction · 0.85
DrawPointFunction · 0.85
MetaSelectFunction · 0.85
SvgSetColorFunction · 0.85
SzColorHTMLFunction · 0.85
WireLineFunction · 0.85

Tested by

no test coverage detected