background image
C H A P T E R 1 3
Drawing and Graphics
About Drawing
Note that for all of the functions described in this chapter:
The coordinates you specify are interpreted as local to the view in which the
object is drawn.
The origin of the coordinate plane (0,0) is the upper-left corner of the view in
which the object is drawn.
Positive values are towards the right or the bottom of the screen from the origin.
For additional information on the Newton coordinate system see "Coordinate
System" (page 3-6).
Shape-Based Graphics
Newton system software provides functions for drawing primitive graphic objects
in a view. These drawing functions return a data structure called a shape that is
used by the drawing system to draw an image on the screen. The drawing system
supports the following shape objects:
rounded rectangles
ovals (including circles)
wedges and arcs
Complex graphics can be drawn by passing arrays of shapes to the various drawing
functions. Primitive shapes can be combined procedurally by collecting them into a
shape called a picture. The appearance will be the same except that, when drawn,
the picture will not be affected by any style specifications. The styles are recorded
into the picture when you make it with
--with the exception of any
transform or clipping slot. See "Controlling Clipping" (page 13-12) and
"Transforming a Shape" (page 13-13) for more information.
Each type of shape is described in the following pages.
A line is defined by two points: the current x and y location of the graphics pen and
the x and y location of its destination. The pen hangs below the right of the defining
points, as shown in Figure 13-1, where two lines are drawn with two different
pen sizes.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна