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

Function DrawPoint

xgeneral.cpp:175–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173// in, either set a cell in the bitmap array or a pixel on the window.
174
175void DrawPoint(int x, int y)
176{
177#ifdef META
178 int n;
179#endif
180#ifdef WINANY
181 int n2;
182#endif
183
184 // Don't set points outside the bounds of the bitmap array.
185 if (!FOnWin(x, y))
186 return;
187 if (gi.fFile) {
188 if (gs.ft == ftBmp) {
189 if (!gi.fBmp) {
190 BmSet(gi.bm, x, y, gi.kiCur);
191 if (gs.fThick) {
192 if (x+1 < gs.xWin)
193 BmSet(gi.bm, x+1, y, gi.kiCur);
194 if (y+1 < gs.yWin) {
195 BmSet(gi.bm, x, y+1, gi.kiCur);
196 if (x+1 < gs.xWin)
197 BmSet(gi.bm, x+1, y+1, gi.kiCur);
198 }
199 }
200 } else {
201 BmpSetXY(&gi.bmp, x, y, gi.kvCur);
202 if (gs.fThick) {
203 if (x+1 < gs.xWin)
204 BmpSetXY(&gi.bmp, x+1, y, gi.kvCur);
205 if (y+1 < gs.yWin) {
206 BmpSetXY(&gi.bmp, x, y+1, gi.kvCur);
207 if (x+1 < gs.xWin)
208 BmpSetXY(&gi.bmp, x+1, y+1, gi.kvCur);
209 }
210 }
211 }
212 }
213#ifdef PS
214 else if (gs.ft == ftPS) {
215 DrawColor(-(int)gi.kvCur);
216 PsLineCap(fTrue);
217 fprintf(gi.file, "%d %d d\n", x, y);
218 PsStroke(2);
219 }
220#endif
221#ifdef META
222 else if (gs.ft == ftWmf) {
223 gi.kiLineDes = gi.kiFillDes = gi.kiCur;
224 MetaSelect();
225 n = gi.nPenWid;
226 if (!gs.fThick) {
227 MetaEllipse(x-n, y-n, x+n*2, y+n*2);
228 } else {
229 MetaEllipse(x-n, y-n, x+n*3, y+n*3);
230 }
231 }
232#endif

Callers 15

FEvalFunctionFunction · 0.85
DrawSpotFunction · 0.85
DrawDashFunction · 0.85
DrawWrapFunction · 0.85
DrawStarFunction · 0.85
DrawSymbolRingFunction · 0.85
DrawRingFunction · 0.85
DrawObjectsFunction · 0.85
xcharts0.cppFile · 0.85
xscreen.cppFile · 0.85
XChartAstroGraphFunction · 0.85
XChartHorizonFunction · 0.85

Calls 6

BmpSetXYFunction · 0.85
DrawColorFunction · 0.85
PsLineCapFunction · 0.85
PsStrokeFunction · 0.85
MetaSelectFunction · 0.85
SvgSetColorFunction · 0.85

Tested by

no test coverage detected