delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/01/07:50:49

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Any Allegro users want to help?
Date: Wed, 1 Jan 1997 11:03:26 +0000
Organization: None
Lines: 18
Distribution: world
Message-ID: <MaQghHA+RkyyEwAu@talula.demon.co.uk>
References: <01bbf45d$777df560$932449c2 AT default> <32C74003 DOT 36FC AT avalon DOT net>
<32c83f77 DOT 1314949 AT news DOT ucalgary DOT ca> <32c9ba25 DOT 0 AT ntnews DOT compusmart DOT ab DOT ca>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019