Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!batcomputer!sun!nelson From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: comp.graphics Subject: Re: thick lines, circles and ellipses Message-ID: <250@sun.soe.clarkson.edu> Date: 8 Jan 88 14:57:35 GMT References: <694@prefix.liu.se> Reply-To: nelson@sun.soe.clarkson.edu.UUCP (Russ Nelson) Organization: Clarkson University, Potsdam, NY Lines: 22 Keywords: computer graphics, circles, ellipses, algorithms In article <694@prefix.liu.se> ingwa@prefix.liu.se (Inge Wallin) writes: >The current disussion about circles made me think about something else >in the same genre. How do you, efficiently, draw lines, arcs, circles >and so on with a line width bigger than 1? The typical technique is to generate a stream of pixels and run them through a routine that plops (it's a technical term that means to OR or AND NOT a specific shape) something down. In Painter's Apprentice (A soon to be released paint package for the PC's EGA ), I have a VERY efficient routine to plop a 16x16 bit shape down. For example, the code is split into the following cases: clipped/non-clipped 16 bits wide/24 bit wide OR/AND NOT/other I also pre-shift 8 different copies of the shape, one for each different byte boundary. (Oh, for a barrel shifter!). I use this code even though I have a "Chris Pike" style compiling blit. For obvious reasons, the speed of this code dominates the line drawing speed. Every cycle you can save in this routine will be amply repaid. -russ