C H A P T E R 1 3
Drawing and Graphics
Using the Drawing Interface
Using Drawing View Classes and Protos
Four view classes and three protos, which you can use to create your own templates,
are built into the system. The view classes include:
--displays polygons or ink, or accepts graphic or ink input.
--displays a bitmap or picture object shape.
--edits views that can accept both text and graphic user input.
--displays a scaled image of another view.
The protos include:
--provides a view in which you can display, magnify, scroll,
and annotate images.
--is used in conjunction with a
displays a small copy of the image with a rectangle representing the location and
panel in the image.
--provides a way to use a thumbnail, but also
adjusts the thumbnail's size to reflect the aspect ratio of the image that it contains.
Displaying Graphics Shapes and Ink
class to display polygons and ink, or to accept graphic
or ink input. The
class includes these features:
Shape recognition and editing, such as stretching of shapes from their vertices,
view resizing, scrubbing, selection, copying to clipboard, duplicating, and other
gestures, as controlled by the setting of the
Snapping of new line endpoints to nearby vertices and midpoints of existing shapes.
Automatic resizing to accommodate enlarged shapes (when the view is enclosed
). This feature is controlled by the
Views of the
class are supported only as children of views of the
class. In other words, you can put a
only inside a
You don't need to create polygon views yourself if you are accepting user input
. You simply provide a
and when the user
draws in it, the view automatically creates polygon views to hold shapes.