QuickDraw is the 2D graphics library and associated Application Programming Interface (API) which is a core part of the classic Apple Macintosh operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still exists as part of the libraries of Mac OS X, but has been largely superseded by the more modern Quartz graphics system. In Mac OS X v10.4, QuickDraw has been officially deprecated. In Mac OS X v10.5 applications using QuickDraw can't make use of the added 64-bit support.
QuickDraw defines a key data structure, the graphics ''port'', or GrafPort. This is a logical drawing area where graphics can be drawn. The most obvious on-screen "object" corresponding to a GrafPort is a window, but the entire desktop view can be a GrafPort, and off-screen ports can also exist.
The GrafPort defines a coordinate system. In QuickDraw, this has a resolution of 16 bits, giving 65,536 unique vertical and horizontal locations. These are numbered from -32,767 on the extreme left (or top), to +32,768 on the extreme right (or bottom). A window is usually set up so that the top, left corner of its content area is located at 0,0 in the associated GrafPort . A window's content area does not include the window's frame, drop shadow or title bar (if any).
QuickDraw coordinates refer to the infinitely thin lines ''between'' pixel locations. An actual pixel is drawn in the space to the immediate right and below the coordinate. This eliminates graphical glitches caused by off-by-one errors.
On the Macintosh, pixels are square and a GrafPort has a default resolution of 72 pixels per inch, chosen to match conventions established by the printing industry of having 72 points to the inch.
QuickDraw also contains a number of scaling and mapping functions.
QuickDraw maintains a number of global variables per process, chief among these being the current port. This originally simplified the API, since all operations pertain to "the current port", but as the OS has developed, this use of global state has also made QuickDraw much harder to integrate with modern design approaches such as multi-threading, pre-emptive multitasking and so on. To address these problems, the Carbon API (a bridge between Mac OS 9 and OS X) adds additional parameters to some of the routines, allowing for the (opaque) storage of thread information and a new (non-polled) event structure.
Each of these objects (except text) may be drawn using a "pen", which can have any rectangular dimensions, pattern or color. Note that, because the pen is rectangular and axis-aligned, diagonal lines will end up thicker than horizontal or vertical ones. Shapes may be drawn filled or framed, using any pattern or color. A filled Arc forms a wedge. Text may be drawn in any installed font, in a variety of stylistic variations, and at any size and color. Text is scaled in a variety of ways depending on how it is stored - TrueType fonts will scale smoothly to any size, whereas bitmap fonts do not usually scale well.
An important feature of QuickDraw was support for ''transfer modes'', which governed how a destination pixel value was related to its previous value and the color of the object being drawn.
The set of attributes of the pen and text drawing are associated with the GrafPort.
Regions are a key data structure in QuickDraw. They define an arbitrary set of pixels, rather like a bitmap, but in a compressed form which can be very rapidly manipulated in complex ways. Regions can be combined (union), subtracted (difference), and XORed to form other Regions. They can be used within a GrafPort for clipping, or drawn filled or framed like any other shape. A series of framed shapes and connected lines may be combined into a Region. A Region need not consist of a contiguous set of pixels - disconnected regions are possible and common. Although regions could allow powerful graphic manipulations they are limited by the current implementation that restricts the maximum region data storage size to a sixteen bit value and so are not practical as a general-purpose drawing composition tool and practical use at high resolution is also restricted. Regions underpin the rest of QuickDraw, permitting clipping to arbitrary shapes, essential for the implementation of multiple overlapping windows. Invented by Bill Atkinson, Regions were patented as a separate invention by Apple.
A region is specified (after initial creation) by an ''opening'' of the region, drawing various QuickDraw shapes, and ''closing'' the region. Hidden routines construct the region as the QuickDraw commands are executed. Bitmaps may also be converted to regions, and bitmaps may be made from regions by "painting" or "filling" the region into a graphics port.
The internal structure of a region, other than the storage length and its bounding rectangle, is opaque - there are no Apple-published documents available, though the mechanism is outlined in the patent. Regions are implemented using both vertical and horizontal compression. A region is stored as a series of horizontal scan lines ("rasters"), each of which contains a vertical coordinate followed by a list of horizontal inversion coordinates. Each inversion point can be thought of as toggling inclusion in the region for all the points after it: the first point turns the region on, the second turns it off, and so on. Further compression is achieved by storing each line differentially: each line contains only the differences from the previous line rather than a full set of inversion points. Finally, identical adjacent scan lines are efficiently encoded by simply skipping them. In this way, a commonly used region, the rounded corner rectangle, is efficiently encoded, and complex operations such as region composition and image clipping may be done without requiring either extensive processor cycles or large amounts of memory. (The original systems executing QuickDraw code used processors operating at 8 megahertz clock rates and systems had but 128 kilobytes of writable memory.)
Because regions are bound to a specific orientation, a ninety degree rotation of a region would require both detailed reverse engineering of the structure and extensive coding. A general rotation is impractical when compared to rotating the original source boundary description and simply creating a new region. However, the API includes conversion routines to and from BitMaps. (Bitmaps may also be rotated using well known methods, but with various degrees of image degradation depending upon angle chosen, the storage and processor cycles available to the operation, and the complexity of the algorithm.)
Apple has recently (in the Carbon API) defined regions as an opaque structure under some program compilation options.
An entire BitMap (or PixMap, when referring to color images) may be copied from one GrafPort to another, with scaling and clipping. Known as blitting, or ''CopyBits'', after the name of the function, this operation is the basis for most animation and sprite-like effects on the Mac.
QuickDraw provides a similar blitting function which is designed to implement scrolling within a GrafPort - the image in the port can be shifted to a new location without scaling (but with clipping if desired).
Each graphics primitive operation is vectored through the StdProcs, a series of function pointers stored in the GrafPort. This limited polymorphism permits individual operations to be overridden or replaced by custom functions, allowing printer drivers to intercept graphics commands and translate them to suitable printer operations. In this way, QuickDraw can be rendered using PostScript, a fact that enabled the Macintosh to practically invent desktop publishing.
Similar to a subclass, the Window data structure began with the associated GrafPort, thus basically making windows exchangeable with any GrafPort. While convenient, this could be a source of programming errors.
In 1987, the Macintosh II was developed and launched, which was designed as a more conventional three-box design - CPU, monitor and keyboard all separate. Because the monitor was separate, and larger than the original Mac, the video architecture had to necessarily change. In addition, the Mac II took the Macintosh from black-and-white to full color. Apple also decided at this time to support a seamless desktop spanning multiple monitors, an industry first. Thus Color QuickDraw, a significant extension of the original QuickDraw, was created. The original architecture lacked much provision for expandability, but using a series of hacks, the Apple developers managed to make the addition of color and the new video architecture virtually seamless to both developers and end users.
Color QuickDraw introduced new data structures, including GDevices to represent each attached video card/monitor, and a new color GrafPort (CGrafPort) structure to handle color, as well as PixMaps instead of BitMaps for multiple bits-per-pixel images. One of the hacks for compatibility used here was that the new structure was exactly the same size as the old one, with most data members in the same place, but with additional handles and pointers to color structures in place of the BitMap fields. The upper two bits of the ''rowBytes'' field were pressed into use as flags to distinguish a GrafPort from a CGrafPort (they were always zero on old-style GrafPorts because a BitMap could never feasibly be so wide as to ever set these bits). The use of these two high bits would come back to haunt QuickDraw later, as it forced a maximum row width of just 4,096 on 32-bit PixMaps, which became problematic for high-resolution graphics work. Later development (Carbon) eliminated this limitation but was not fully backward compatible. A Palette Manager was also added in Color QuickDraw which managed the arbitration of colors on indexed video devices. Most graphics primitives operations remained either unchanged (but would operate in color), or else new color versions of the black and white APIs were added.
Initially, Color QuickDraw was only capable of operating with 1, 2, 4 and 8-bit video cards, which were all that was available at the time. Soon after however, 24-bit video cards appeared (so-called true color), and QuickDraw was updated again to support up to 32 bits per pixel (in reality, 24 bits, with 8 unused) of color data ("32-Bit QuickDraw"). The architecture always allowed for this however, so no new APIs were necessary. The color data structures themselves allowed a color depth of 1, 2, 4, 8, 15 and 24 bits, yielding 1, 4, 16, 256, 32,768 and 16,777,216 colors respectively, or 4, 16 and 256 scales of grey. QuickDraw took care of managing the resampling of colors to the available color depths of the actual video hardware, or transfer between offscreen image buffers, including optionally dithering images down to a lower depth to improve image quality. A set of color sampling utilities were also added so that programmers could generate optimal color palettes for use with indexed video devices.
The architecture of QuickDraw had always allowed the creation of GrafPorts and their associated BitMaps or PixMaps "offscreen", where graphics could be composed in memory without it being visible immediately on the screen. Pixels could be transferred between these offscreen ports and the screen using the QuickDraw blitting function CopyBits. Such offscreen compositing is the workhorse for games and graphics-intensive applications. However, until the advent of 32-Bit QuickDraw, such offscreen worlds had to be created and set up by hand by the programmer within his application, and involving as it did three or more separate and fairly complex data structures (CGrafPort, PixMap and GDevice, and for indexed devices, the color look-up table and its inverse), could be error prone. With 32-Bit QuickDraw, OS support for handling this was added, with the "Offscreen Graphics World" or GWorld. The video buffer (PixMap) of a GWorld could be stored in main memory, or when available in unused parts of video ram where copying to the screen could be optimized for speed by avoiding the need to transfer a large amount of pixel data across the main memory bus.
With the advent of QuickTime, QuickDraw gained the ability to deal with compressed raster data, such as JPEG. The QuickTime Image Compression Manager integrated closely with QuickDraw: in particular, image decompression calls were full-fledged QuickDraw drawing calls, and if a picture was being recorded, the ''compressed'' data would be saved as part of the picture, for display when the picture was later drawn. The Image Compression Manager also added integration with ColorSync color matching.
After this, apart from back-end changes to optimize for new processor architectures (PowerPC), QuickDraw remained largely unchanged throughout the rest of the life of the classic Mac OS. QuickDraw GX and QuickDraw 3D shared the QuickDraw name and were able to interoperate with QuickDraw PixMap and picture data structures, but were otherwise completely separate in functionality.
With Mac OS X, QuickDraw became part of the Carbon API. With the release of Mac OS X 10.4, QuickDraw was officially deprecated.
Category:Apple Inc. software Category:Mac OS APIs
de:QuickDraw fr:QuickDraw it:QuickDraw ja:QuickDrawThis text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.
In 1980, Markoe was original head writer for ''The David Letterman Show'', a short-lived live NBC morning show whose writing team was recognized with a Daytime Emmy Award.
She may be best known for her work on ''Late Night with David Letterman'' (a show for which she shared in three Primetime Emmy Award for Outstanding Writing). She engineered most of the original concepts and architecture for the ground-breaking late night talk show, along the way creating the segment "Stupid Pet Tricks", as well as "Stupid Human Tricks" and "Viewer Mail." Many of the ideas behind the remote segments outside the studio came from Markoe, who also won a Writer's Guild award for her writing/performing work on HBO's late-1980s hit ''Not Necessarily the News''. She and Letterman were also involved romantically from 1978–1988, after which Markoe moved to California to pursue a writing career.
She has also written for television shows,such as ''Newhart'', ''Sex and the City'' and ''Moonlighting''. She appeared on-camera as a lifestyle reporter at KCOP-TV in Los Angeles, then for Michael Moore's NBC show ''TV Nation'', and worked on other magazine shows such as ''Lifetime Magazine''. In the early 1990s she wrote and directed a number of HBO and Cinemax comedy specials.
In 2005, Markoe was a regular panelist on Animal Planet's ''Who Gets the Dog?'' She has had a number of columns and written for many periodicals including ''Rolling Stone'', ''Time'', ''New York Woman'', ''New Woman'', ''US News and World Report'', ''US'', ''People'', ''Esquire'', ''The Huffington Post'', ''Glamour'', ''The New York Times'', ''The Los Angeles Times'', ''LA Weekly'', ''Real Simple'', etc. She appears in episode 2 of ''Friends'' as Marsha, the irritable museum curator and can be seen in the movie ''EDTV'' as a panelist, as well as in the cast of ''The Aristocrats''. She appeared in two episodes of ''Space Ghost Coast to Coast'' from 1997–1998 as the unwilling subject of the Late Night talk show host's affections. Her books include ''Merrill Markoe's Guide to Love'', ''How To Be Hap-Hap-Happy Like Me'', ''What the Dogs Have Taught Me'', ''It's My F---ing Birthday'', ''The Psycho Ex Game'' (cowritten with Andy Prieboy) and ''Walking in Circles Before Lying Down'' and ''Nose Down, Eyes Up'' (2009).
Category:1952 births Category:Living people Category:American columnists Category:American humorists Category:American novelists Category:American screenwriters Category:David Letterman Category:Emmy Award winners Category:University of California, Berkeley alumni Category:Women screenwriters
This text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.
The World News (WN) Network, has created this privacy statement in order to demonstrate our firm commitment to user privacy. The following discloses our information gathering and dissemination practices for wn.com, as well as e-mail newsletters.
We do not collect personally identifiable information about you, except when you provide it to us. For example, if you submit an inquiry to us or sign up for our newsletter, you may be asked to provide certain information such as your contact details (name, e-mail address, mailing address, etc.).
When you submit your personally identifiable information through wn.com, you are giving your consent to the collection, use and disclosure of your personal information as set forth in this Privacy Policy. If you would prefer that we not collect any personally identifiable information from you, please do not provide us with any such information. We will not sell or rent your personally identifiable information to third parties without your consent, except as otherwise disclosed in this Privacy Policy.
Except as otherwise disclosed in this Privacy Policy, we will use the information you provide us only for the purpose of responding to your inquiry or in connection with the service for which you provided such information. We may forward your contact information and inquiry to our affiliates and other divisions of our company that we feel can best address your inquiry or provide you with the requested service. We may also use the information you provide in aggregate form for internal business purposes, such as generating statistics and developing marketing plans. We may share or transfer such non-personally identifiable information with or to our affiliates, licensees, agents and partners.
We may retain other companies and individuals to perform functions on our behalf. Such third parties may be provided with access to personally identifiable information needed to perform their functions, but may not use such information for any other purpose.
In addition, we may disclose any information, including personally identifiable information, we deem necessary, in our sole discretion, to comply with any applicable law, regulation, legal proceeding or governmental request.
We do not want you to receive unwanted e-mail from us. We try to make it easy to opt-out of any service you have asked to receive. If you sign-up to our e-mail newsletters we do not sell, exchange or give your e-mail address to a third party.
E-mail addresses are collected via the wn.com web site. Users have to physically opt-in to receive the wn.com newsletter and a verification e-mail is sent. wn.com is clearly and conspicuously named at the point of
collection.If you no longer wish to receive our newsletter and promotional communications, you may opt-out of receiving them by following the instructions included in each newsletter or communication or by e-mailing us at michaelw(at)wn.com
The security of your personal information is important to us. We follow generally accepted industry standards to protect the personal information submitted to us, both during registration and once we receive it. No method of transmission over the Internet, or method of electronic storage, is 100 percent secure, however. Therefore, though we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
If we decide to change our e-mail practices, we will post those changes to this privacy statement, the homepage, and other places we think appropriate so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we disclose it.
If we make material changes to our e-mail practices, we will notify you here, by e-mail, and by means of a notice on our home page.
The advertising banners and other forms of advertising appearing on this Web site are sometimes delivered to you, on our behalf, by a third party. In the course of serving advertisements to this site, the third party may place or recognize a unique cookie on your browser. For more information on cookies, you can visit www.cookiecentral.com.
As we continue to develop our business, we might sell certain aspects of our entities or assets. In such transactions, user information, including personally identifiable information, generally is one of the transferred business assets, and by submitting your personal information on Wn.com you agree that your data may be transferred to such parties in these circumstances.