C H A P T E R 1 3
Drawing and Graphics
Using the Drawing Interface
Notice that there are two types of pictures: bitmaps (a frame with
slots) and Format 1 PICTs (binary objects of class picture).
can draw both of these types of objects,
so you just need to choose a format and use
SetValue(myView, 'icon, kPictureAsBitMap);
SetValue(myView, 'icon, kPictureAsPict);
Optimizing Drawing Performance
You can use several methods to make drawing functions execute faster.
If you have a fairly static background picture, you can use a predefined PICT
resource. Create the PICT in your favorite drawing program, and use the PICT as
the background (
). The graphics system also has a picture-making
function that enables you to create pictures that you can draw over and over again.
If you want to improve hit-testing of objects, use a larger view in combination with
rather than using smaller views
with an individual
. This is especially true of a view that
consists of regular smaller views.