Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mmm.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!stolaf!umn-cs!mmm!schley From: schley@mmm.UUCP (Steve Schley) Newsgroups: net.micro.mac Subject: Re: Re: Deficiencies in QuickDraw support fo Message-ID: <172@mmm.UUCP> Date: Mon, 8-Jul-85 13:57:28 EDT Article-I.D.: mmm.172 Posted: Mon Jul 8 13:57:28 1985 Date-Received: Fri, 12-Jul-85 01:43:54 EDT References: <202@harvard.UUCP> <26700020@inmet.UUCP> <218@harvard.ARPA> Organization: 3M Company, St. Paul, Minn. Lines: 34 Ben Hyde posed this problem: > ... You have two line segments > which are known to cross, one "behind" the other. I want to "cut out" a > little bit of the one which is "behind", so it looks like this: > > \ / <- line b > \ / > \ / > \ > \ > / \ > / \ > / \ <- line a > > Now, the way that occurred to me was to subtract a region of fixed > width around line a from the clipping region while drawing line b. > Now what I will have to do is compute the points where line b crosses > the boundaries of that region myself. Anyone got a better way? Sure do: use White-Out! Here's how I do it... Assuming that your application can always draw (or redraw) line a after line b, simply draw line b, then change pen color to background, change pen size to a few pixels wider than the lines being drawn, offset the endpoints of line a by half the new wider line width, and draw this new line a. Finally, reset the pen and line attributes and draw the real line b. Sure, this isn't as clean as the region technique which handles the hidden line problem on its own, but it works, and making regions around lines isn't always clean, either.-- Steve Schley ihnp4!mmm!schley