Graphics
Graphics
The Macintosh User Interface Toolbox provides a rich set of routines that
support graphics. Using the Toolbox routines, your application can provide
fast and high-quality graphics and visual display to the user.
Comparison of TrueType and bitmapped fonts
You can use the routines provided by QuickDraw to draw text, straight
lines, ovals, rectangles, or any variety of shapes. QuickDraw lets you define
multiple drawing environments (ports)-each with its own coordinate system,
location on the screen, and other characteristics.
QuickDraw also performs automatic clipping of drawing
environments-pr eventing another application from drawing in the drawing
environment used by your application. QuickDraw manages all drawing to the
screen and provides a flexible set of routines your application can use to
perform most graphics operations.
Color QuickDraw provides support for gray-scale and color devices. In
addition, users can connect multiple monitors of different sizes, depths, and
color capabilities. Color QuickDraw automatically draws to the appropriate
screen and takes advantage of the special characteristics of that device.
Color QuickDraw in System 7.0 supports both indexed and direct devices.
Indexed devices typically have a color look-up table with 256 entries,
meaning that up to 256 different colors can be displayed at once on the screen.
The user's video card and monitor determine the number of bits per pixel and
the number of colors that can be displayed on the screen. For indexed devices,
Color QuickDraw supports 1, 2, 4, or 8 bits of information per pixel.
Direct devices do not use a color look-up table; instead, the video card
contains enough RAM to directly store color information for each pixel. This
allows direct devices to display up to 16 million colors. For direct devices,
Color QuickDraw supports 32 bits of information per pixel (although only
24 are actually used). See the Graphics Overview for a comparison of
indexed and direct devices.
Using the Palette Manager, you can create palettes for your application. A
palette is a convenient way to group collections of colors. You can also use
palettes if your application makes special uses of color-for example, if your
application needs color table animation. See the Palette Manager
for information on the default color tables supplied with System 7.0 and for
information on how to set up and maintain palettes.
You can use the Color Picker Package to offer users a standard dialog box
for choosing a color. The user can choose any color from the entire range the
available device can display. See the Color Picker Package for information
on how to display the Color Picker dialog box and for a description of the color
models used by the Color Picker Package.
You can examine the contents of pictures and pixel maps using the
Picture Utilities Package. See the Picture Utilities Package for
more information.
You can use offscreen graphics to prepare images in a graphics environment
you create and then move the images quickly into view. The
Graphics Devices Manager lets your application get information about
particular graphics devices and provides routines your application can use if it
needs exacting control of the graphics environment.
For an introduction to graphics on the Macintosh computer, see the
Graphics Overview. If you're developing a graphics-intensive application,
see the Color QuickDraw, Palette Manager, and
Graphics Devices Manager entries for information on routines that
provide advanced graphics features.
System 7.0 also provides support for color icons. See the Finder Interface
for information on how you can create color icons for your application and the
documents it creates.