Asymptote’s graphical capabilities are based on four primitive
commands. The three
PostScript drawing commands
clip add objects to a picture in the order in
which they are executed, with the most recently drawn object appearing on top.
The labeling command
label can be used to add text
labels and external EPS images, which will appear on top of the
PostScript objects (since this is normally what one wants), but
again in the relative order in which they were executed. After drawing
objects on a picture, the picture can be output with the
shipout function (see shipout).
If you wish to draw
PostScript objects on top of labels (or verbatim
tex commands; see tex), the
layer command may be
used to start a
void layer(picture pic=currentpicture);
layer function gives one full control over the order in which
objects are drawn. Layers are drawn sequentially, with the most recent
layer appearing on top. Within each layer, labels, images, and
tex commands are always drawn after the
PostScript objects in that layer.
While some of these drawing commands take many options, they all have sensible default values (for example, the picture argument defaults to currentpicture).
|• draw:||Draw a path on a picture or frame|
|• fill:||Fill a cyclic path on a picture or frame|
|• clip:||Clip a picture or frame to a cyclic path|
|• label:||Label a point on a picture|