Mail Archives: djgpp/1997/01/01/07:50:49
>As you volunteered...
> what does the heck does d do in do_line?
>
>void do_line(BITMAP *bmp, int x1, y1, x2, y2, int d, void (*proc)());
Strictly speaking it doesn't do anything, it's just passed to the proc
callback function. I designed it this way because putpixel() takes four
parameters, the bitmap, the x/y position, and the color. This means you
can use putpixel() as a do_line() callback, with d representing the
color of the line. If you are writing your own callback function you can
use it for whatever you like: a color, a mode flag, even a pointer to a
structure if you do a bit of casting, or of course you can just ignore
it...
/*
* Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
* Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
*/
- Raw text -