Path: utzoo!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: How do I pick/hit graphical primitives in X ? Message-ID: <12676@adobe.UUCP> Date: 18 Mar 91 19:16:15 GMT References: <1991Mar15.100902.16094@abblund.se> <1991Mar16.160205.20935@cs.tcd.ie> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 27 In article <1991Mar16.160205.20935@cs.tcd.ie> cjmchale@cs.tcd.ie (Ciaran McHale) writes: >In <1991Mar15.100902.16094@abblund.se> erik@abblund.se (Erik Sparre) writes: > >>When you develop a direct manipulation graphical user interface you >>will sooner or later need the ability to detect whether the user pointed >>at a certain graphical object (line, ect, circle). >>[...] >>Is there any good way to detect picking in X or any X-based library >>without having to do the calculations yourself ? > >Choices: > o Use Display Popstscript. > ... Just to expand a bit on Ciaran's response, Display PostScript has a set of operators that let you test whether a path intersects an aperture. You can test whether the stroked path intersects the aperture or whether the filled path intersects the aperture. You can make the aperture large or small, square, round, of whatever shape you like. -paul asente asente@adobe.com ...decwrl!adobe!asente Ratz put a bucket of liquid in front of me. "I wanted a glass of docs, Ratz. What the hell is this?" I barked. "Motif don't fit in a glass anymore," he barked back. I looked at the liquid. It was totally opaque to me.