C H A P T E R 1 3
Drawing and Graphics
Using the Drawing Interface
Default Transfer Mode
The default transfer mode is actually a split state: bitmaps and text are drawn with
transfer mode, but other items (geometric shapes, pens, and fill patterns)
are drawn with a
transfer mode. However, when you actually specify a
transfer mode (with a non-
value in the
slot of the style
frame), all drawing uses the specified mode.
Transfer Modes at Print Time
Only a few transfer modes are supported for printing. Only
may be used; other modes may produce
Most problems occur when using PostScript
printers, so you should test your code on
LaserWriters as well as StyleWriters.
When the system draws a shape in a view for which the
flag is set, it
draws only the part that fits inside the view in which drawing takes place. Any parts
of the shape that fall outside the boundaries of that view are not drawn, as if they
have been cut off or clipped. The term clipping refers to this view system behavior;
in common usage, the shape is said to have been "clipped to the destination view."
Although the view system allows drawing outside the boundaries
of a view for which the
flag is not set, it does not
guarantee that drawing outside the boundaries of the view will
occur reliably. You need to make your destination view large
enough to completely enclose the shapes you want to draw. You
could also set the destination view's
flag to clip
drawing to the bounds of the destination view. Note also that an
application base view that is a child of the root view always clips
drawing to its boundaries.
When no other clipping region is specified and
is set, the boundaries
of the destination view define the region outside of which drawing does not occur.
This area is known as the clipping region. If you want to specify different clipping
regions, you can use the style frame's
slot to do so. Because drawing is
always clipped to the boundaries of the destination view, regardless of any other
clipping region you specify, you cannot use the
slot to force drawing
outside the boundaries of a view.