

Shapes may be drawn filled or framed, using any pattern or color. Note that, because the pen is rectangular and axis-aligned, diagonal lines will end up thicker than horizontal or vertical ones. Regions (arbitrary sets of pixels-see below)Įach of these objects (except text) may be drawn using a "pen", which can have any rectangular dimensions, pattern or color.Polygons (arbitrary closed shapes built from a list of points joined by lines).Arcs (and wedges), both circular and oval.

#Quickdraw. mac os#
To address these problems, the Carbon API (a bridge between Mac OS 9 and Mac OS X) added additional parameters to some of the routines, allowing for the (opaque) storage of thread information and a new (non-polled) event structure.Įverything seen on a classic Mac OS screen is drawn by QuickDraw, but the library itself is quite low level. This originally simplified the API, since all operations pertained to "the current port," but as the OS developed, this use of global state has also made QuickDraw much harder to integrate with modern design approaches such as multi-threading and pre-emptive multitasking. QuickDraw maintained a number of global variables per process, chief among these being the current port. QuickDraw also contained a number of scaling and mapping functions. On the Macintosh, pixels were square, and a GrafPort had a default resolution of 72 pixels per inch, chosen to match conventions established by the printing industry of having 72 points per inch. This made it easier for programmers to avoid graphical glitches caused by off-by-one errors. An actual pixel was drawn in the space to the immediate right and below the coordinate. QuickDraw coordinates referred to the infinitely thin lines between pixel locations. A window's content area did not include the window's frame, drop shadow or title bar (if any). A window was usually set up so that the top, left corner of its content area was located at 0,0 in the associated GrafPort. These are numbered from -32,767 on the extreme left (or top), to +32,767 on the extreme right (or bottom). In QuickDraw, this had a resolution of 16 bits, giving 65,536 unique vertical and horizontal locations. The GrafPort defined a coordinate system. The most obvious on-screen "object" corresponding to a GrafPort was a window, but the entire desktop view could be a GrafPort, and off-screen ports could also exist. This was a logical drawing area where graphics could be drawn. QuickDraw defined a key data structure, the graphics port, or GrafPort. A raster system requires much less processing power however, and was the prevailing paradigm at the time that QuickDraw was developed. This is in contrast to vector graphics systems, where graphics primitives are defined in mathematical terms and rasterized as required to the display resolution. In addition, QuickDraw was a raster graphics system, which defines the pixel as its basic unit of graphical information. QuickDraw was grounded in the Apple Lisa's LisaGraf of the early 1980s and was designed to fit well with the Pascal-based interfaces and development environments of the early Apple systems.
