Mail Archives: djgpp/1998/08/29/11:15:28
--- Original Message ---
From: Deathifier <storey AT tig DOT com DOT au>
Time: Sat, 29 Aug 199816:38:36
[snip]
>void do_line(BITMAP *bmp, int x1, y1, x2, y2, int d, void (*proc)());
[snip]
>I understand most of it, except for:
>int d
>void (*proc) ()
[snip]
OK, what you want to do is have a function that will be called for each
discrete point along the line. For example:
void my_putpixel(BITMAP *bmp, int x, int y, int d)
{
// draw a pixel on bmp and x, y using color d
}
Then, call the do_line function:
do_line(screen, 0, 0, 639, 479, 1, my_putpixel);
or
void(*proc)();
proc = my_putpixel;
do_line(screen, 0, 0, 639, 479, 1, my_putpixel);
HTH. Mail me if you need more help. Bye for now,
--
Laurence Withers, mailto:lwithers AT lwithers DOT demon DOT co DOT uk
OPES Homepage: http://www.lwithers.demon.co.uk/opes/
- Raw text -