background image
C H A P T E R 1 3
Drawing and Graphics
13-12
Using the Drawing Interface
Default Transfer Mode
13
The default transfer mode is actually a split state: bitmaps and text are drawn with
a
modeOR
transfer mode, but other items (geometric shapes, pens, and fill patterns)
are drawn with a
modeCOPY
transfer mode. However, when you actually specify a
transfer mode (with a non-
nil
value in the
transferMode
slot of the style
frame), all drawing uses the specified mode.
Transfer Modes at Print Time
13
Only a few transfer modes are supported for printing. Only
modeCOPY
,
modeOR
,
and
modeBIC
may be used; other modes may produce
unexpected results.
Note
Most problems occur when using PostScript
printers, so you should test your code on
LaserWriters as well as StyleWriters.
Controlling Clipping
13
When the system draws a shape in a view for which the
vClipping
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."
Note
Although the view system allows drawing outside the boundaries
of a view for which the
vClipping
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
vClipping
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
vClipping
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
clipping
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
clipping
slot to force drawing
outside the boundaries of a view.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна