Path: utzoo!attcan!uunet!cs.utexas.edu!csd4.csd.uwm.edu!mailrus!purdue!gatech!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Re: turning on a pixel Message-ID: <1355@speedy.mcnc.org> Date: 24 Aug 89 23:28:57 GMT References: <6294@hubcap.clemson.edu> <863@eutrc3.urc.tue.nl> <843@cf-cm.UUCP> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: Microelectronics Center of NC; RTP, NC Lines: 19 In article <843@cf-cm.UUCP> ralph@computing-maths.cardiff.ac.uk (Ralph Martin) writes: >If you look at Inside Mac, it clearly says that coordinates refer to >points at the corner of pixels, not the pixels themselves. Thus, it >seems to me that any code like moveto(x,y) lineto(x,y) should draw a >line of zero length, ie nothing at all. It seems to me that all of you >have it wrong when you do this (including you guys at Apple, who >actually apparently make such code not draw a line of zero length, but >a single pixel). I've always used (the equivalent of) moveto(x,y), >lineto(x+1,y+1) to set a given pixel. You forgot about the pen size. The call 'lineto(x,y)' should be interpreted as: 'put pen down at the current position', 'move pen to (x,y)', 'pick it up'. Even if the move does not change the position, the mark remains. See Inside Mac vol 1, page 155, fig 15. KK -- Kris Kozminski kk@mcnc.org "The party was a masquerade; the guests were all wearing their faces."