Newsgroups: comp.sys.next Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!neon.Stanford.EDU!ly From: ly@neon.Stanford.EDU (Eric Ly) Subject: Re: How to put a dot on the NeXT screen ( ***SHORT*** :-) Message-ID: <1991Jun5.072816.11756@neon.Stanford.EDU> Organization: Computer Science Department, Stanford University, Ca , USA References: <1991Jun4.134204.28921@casbah.acns.nwu.edu> <1991Jun5.055531.6189@fcom.cc.utah.edu> Date: Wed, 5 Jun 1991 07:28:16 GMT Lines: 30 In article <1991Jun5.055531.6189@fcom.cc.utah.edu> burchard@math.utah.edu (Paul Burchard) writes: >In article <1991Jun4.134204.28921@casbah.acns.nwu.edu> >jimmyc@casbah.acns.nwu.edu (James Choi) writes: >> >> I am having trouble putting a dot on the NeXT screen. Could someone show >> me how to do it with a compilable sample source code? > [explanation deleted...] Actually, there's a much more efficient way of doing it. Let's say you want to put a dot at a location given by an NXPoint. Then, the following function will put your dot on the screen: void doDot(const NXPoint *point) { NXRect rect; rect.origin = point->origin; rect.size.width = rect.size.height = 1.0; NXRectFill(&rect); } It's more efficient for various reasons, but basically, it uses one optimized Display PostScript operator rather than several PostScript operators. Eric Ly Stanford University