| version 1.7, 2003/10/27 09:54:11 |
version 1.8, 2004/04/06 08:51:22 |
| Line 1709 outtext (char *textstring) /* {{{ */ |
|
| Line 1709 outtext (char *textstring) /* {{{ */ |
|
| |
|
| /* TurboC-source/putpixel.c */ |
/* TurboC-source/putpixel.c */ |
| |
|
| void |
/* This is original putpixel() function from the TurboC library. |
| putpixel (int x, int y, int color) /* {{{ */ |
However it does not work well, because sometimes pixel are not printed. */ |
| |
|
| |
static void |
| |
putpixel_orig (int x, int y, int color) /* {{{ */ |
| { |
{ |
| int OldColor; |
int OldColor; |
| OldColor = TcForegroundColor; |
OldColor = TcForegroundColor; |
| Line 1732 putpixel (int x, int y, int color) /* {{ |
|
| Line 1735 putpixel (int x, int y, int color) /* {{ |
|
| setcolor (OldColor); |
setcolor (OldColor); |
| } /* }}} */ |
} /* }}} */ |
| |
|
| |
/* Safe variant of putpixel() function was created |
| |
by Ondrej Jombik <nepto@platon.sk> 2003-04-05 */ |
| |
|
| |
static void |
| |
putpixel_safe (int x, int y, int color) /* {{{ */ |
| |
{ |
| |
register int n_loops; |
| |
|
| |
for (n_loops = 0; getpixel(x, y) != color; n_loops++) |
| |
putpixel_orig(x, y, color); |
| |
|
| |
#if defined(X11_BGI_DEBUG) && X11_BGI_DEBUG |
| |
fprintf(stderr, "putpixel_safe(%d, %d, %d): n_loops = %d (%sCOMMON)\n", |
| |
x, y, color, n_loops, n_loops == 1 || n_loops == 0 ? "" : "UN"); |
| |
#endif |
| |
} /* }}} */ |
| |
|
| |
void |
| |
putpixel(int x, int y, int color) /* {{{ */ |
| |
{ |
| |
putpixel_safe(x, y, color); |
| |
} /* }}} */ |
| |
|
| /* TurboC-source/rectangle.c */ |
/* TurboC-source/rectangle.c */ |
| |
|
| void |
void |