From: rsm AT math DOT arizona DOT edu (Robert S. Maier) Newsgroups: comp.os.msdos.djgpp Subject: Re: polygon fill implementaion and theory Date: 15 Apr 1999 17:14:09 GMT Organization: Mathematics Department, University of Arizona Lines: 31 Message-ID: NNTP-Posting-Host: platinum.math.arizona.edu In-reply-to: Matthew Heyman's message of Sun, 11 Apr 1999 22:41:19 +0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >>>>> "Matthew" == Matthew Heyman writes: Matthew> Anybody know the the theory and possibly the implementation of Matthew> a polygon fill? I know Allegro has such functions, but I Matthew> would prefer to write my own function to learn about it. For the theory, try standard graphics textbooks, such as Foley and van Dam. For code, you could do worse than to look at the source code for the GNU libplot library for 2D vector graphics (see URL below). The current release incorporates the X11 vector graphics code, and uses it to draw wide lines and filled polygons. The next release will break out the X11 code as a separate library ("libxmi", i.e. X Machine-Independent vector graphics). By the way, the X11 code was written in pre-ANSI C. Porting it to ANSI C, which is what I needed to do in order to incorporate it, was a bit of a challenge. --Robert -- Robert S. Maier | Internet: rsm AT math DOT arizona DOT edu Dept. of Math. | Univ. of Arizona | FAX: +1 520 621 8322 Tucson, AZ 85721 | Voice: +1 520 621 6892 (department) U.S.A. | +1 520 621 2617 (office) Maintainer of the GNU plotting utilities package (see http://www.gnu.org/software/plotutils/plotutils.html ).