Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!milton!wjs From: wjs@milton.u.washington.edu (William Jon Shipley) Newsgroups: comp.sys.next Subject: Re: Picking an arbitrary shape Summary: infill, dude. Message-ID: <18529@milton.u.washington.edu> Date: 16 Mar 91 09:04:02 GMT References: <1991Mar16.045903.5234@cs.ubc.ca> Organization: University of Washington, Seattle Lines: 23 Stuart Ritchie writes: >[has some postscript shapes] >I'd like to find out which shape receives a mouse up or down >event. > >Is there a way to check whether a mouse event occurs inside of >an arbitrary bounding path (bounding _box_ works for rectangles, >but not circles or arcs or Bart Simpson's.) Yup. Check out infill and instroke to check if your point is in an ordinary path and inufill and inustroke to see if your point is in user path. From the manuals (Summaries/04_OpSummary/_WindowSystemSupportOps.rtf): x y infill bool userpath infill bool return true if pixel at (x, y) (or any pixels in userpath) would be painted by fill of current path Cool stuff. Only works for DPS (and probably PSL2). -william shipley glenn reid wannabe