This is possible because QuickDraw maintains a global coordinate system for a computer's entire potential drawing space and a different local coordinate system for every window displayed in this space. Coordinates in the global coordinate system reflect the entire potential drawing space on this plane. Figure 1-2 illustrates the QuickDraw global coordinate plane. The orientation of the vertical axis, while convenient for computer graphics, differs from mathematical convention. Also, the coordinate plane is bounded by the limits of QuickDraw coordinates, which range from -32768 to 32767.
Windows are rectangular areas that are subsets of the global coordinate plane.
Each window represents its own QuickDraw graphics port. When you create a window, the Window Manager uses QuickDraw to create a graphics port in which the window's contents are displayed. A boundary rectangle is stored in the pixel map for a color graphics port or in the bitmap for a basic graphics port . The graphics port includes a field called portRect , which defines a rectangle to be used for drawing. When you use the Window Manager to place a window on the screen, you specify the location of its port rectangle in global coordinates.