Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!RITVAX.BITNET!LMB7421 From: LMB7421@RITVAX.BITNET Newsgroups: comp.sys.apple Subject: Quickdraw Message-ID: <8804131115.aa26868@SMOKE.BRL.ARPA> Date: 13 Apr 88 18:15:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 79 >From: STEIN%UCONNVM.BITNET@MITVMA.MIT.EDU >Subject: Quickdraw > >The following is the state of my understanding. I would >appreciate corrections and enlightenment. > >There is a global coordinate system and a local coordinate >system. Both are calibrated in pixels. The global >coordinate system (I think) is tied to the hardware, with >the origin [0,0] representing the upper left hand corner of >the screen. The lower right hand corner would usually be >[200,640] (with the vertical coord first, horizontal >second). Actually, nothing is tied to the hardware...the default port is placed at the memory location which is screen memory, but that isn't to say that I couldn't make a global co-ordinate system somewhere else... The Global co-ordinate system is a reference...a large area which spans from -16384 to +16383 in each direction. There can be more than one global coordinate system. >The local coordinate system seems to be an imaginary >coordinate system based on a theoretical underlying document >size supplied by the user. The underlying document is >conceptualized as a rectangle. The local co-ordinate system is as you say...a local system set relative to any point you choose...Say I set up a global co-ordinate system with origin [0,0] at the top corner of the screen. The default local system is also there. However, I can set up a local co-ordinate system with origin [0,0] in the middle of the screen (global co-ordinates [320,200]) and from then on I would access everything as if things to the left and top of the middle of the screen were negative. >When a window is defined, it is placed at a given location >on the screen (based on the upper left hand corner) at a >given size. It can be placed there, and sized, via the >global coordinate system. Correct. A window uses a local co-ordinate system within itself and is placed within a global co-ordinate system (I think you can make another local co-ordinate system a global one, but I'm not sure right off how it's done) >The content in the window shown on the screen is corresponds >to a rectangular portion of the underlying document. The >size and placement of that portion, relative to the >underlying document, is indicated by the scroll bars. Right. >PortRect seems to refer to the local coordinates of the >vertices of the window. But I'm uncertain what BoundsRect >refers to. Also, clearly there must be terminology >referring to the size of the display screen (or desktop?) >and the placement, in global coordinates, of the window on >the desktop. These initial coordinates are passed to the >window manager when a window is defined, but the coordinates >(global) change when the window is resized or moved, and I >haven't recognized a reference to them. ProtRect, If my memory serves me, is the absolute boundary of the port (window). BoundsRect is the boundary for the drawing region. ClipRgn is the clipped region within the boundary rectangle. (why so complex...well, I suppose it makes masking a *** of a lot easier...) >ARPA: stein%uconnvm.bitnet@mitvma.mit.edu Alan H. Stein >BITNET: STEIN@UCONNVM University of Connecticut >UUCP: ...ihnp4!psuvax1!UCONNVM.BITNET!STEIN at Waterbury >CompuServe: 71545,1500 Genie: ah.stein Department of Mathematics Phoenix LMB7421@RITVAX.BITNET ..rutgers!rochester!ritcv!ultb!lmb7421.UUCP ..rutgers!rochester!kodak!gizzmo!lazlo!loki!phoenix.UUCP (last resort) "The opinions expressed above are, alas, not my own. I was too tired when I wrote them to call them my own. My subconsience must have dragged them in from some remote and fantastic world where 'look-and-feel' don't mean a thing."