QuickDraw - Higher Level Operations

Higher Level Operations

Any series of graphics calls to QuickDraw can be recorded in a structure called a Picture. This can then be saved in memory and "played back" at any time, reproducing the graphics sequence. At playback time the picture may be placed at new coordinates or scaled. A picture can be saved to disk in which form it defines the Apple PICT format.

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.

Read more about this topic:  QuickDraw

Famous quotes containing the words higher, level and/or operations:

    For human nature, being more highly pitched, selved, and distinctive than anything in the world, can have been developed, evolved, condensed, from the vastness of the world not anyhow or by the working of common powers but only by one of finer or higher pitch and determination than itself.
    Gerard Manley Hopkins (1844–1889)

    Why level downward to our dullest perception always, and praise that as common sense? The commonest sense is the sense of men asleep, which they express by snoring.
    Henry David Thoreau (1817–1862)

    You can’t have operations without screams. Pain and the knife—they’re inseparable.
    —Jean Scott Rogers. Robert Day. Mr. Blount (Frank Pettingell)