PICASSO(1)

NAME
picasso - a line drawing program

SYNOPSIS
picasso [ [-b size] [-F path] [-T fonttables] [-I path] [-l n] [-M n] [-m margin] [-p mxn] [-txL] ] [- []] [ files []]

DESCRIPTION
picasso is a processor for a pic-like drawing language that produces PostScript output. By default, this output is scaled to fit an 8 by 10 inch print area, and centered on the page.

[-b size]
specifies a buffer of
    size objects accumulated before translation into PostScript. By default, an entire picture is buffered; on machines with small memories, a buffer of a few thousand objects can prevent thrashing when processing a very large picture. This option is for exceptional cases and is not often needed.

    [-I path]
overrides the standard path for searching for the PostScript prologue
    (not needed in normal use).

    [-F path]
overrides the standard path for searching for the
    troff font width tables (not needed in normal use).

    [-T fonttables]
overrides the standard set of font width tables.
    The default is to use the Latin1 tables, which allow the printing of the full Latin-1 (ISO 8859-1) character set, by using the appropriate troff sequences in picasso text strings. The only other meaningful value of this option is -Tpost(.)

    [-l n]
processes layer
    n only, as specified by

    [-M n]
magnifies the output image by
    n (shrinks if 0<n<1).

    [-p mxn]
specifies output device size in inches (8.5×11 default).

    [-t]
packages the PostScript with surrounding troff input so that the
    output file may be passed down a pipeline to troff(1). The MPICTURES macro package can be used with troff to insert the pictures appropriately within the document. Without the flag picasso outputs only PostScript, dropping any text outside the markers (e.g., and .PE()) delimiting each picture.

    [-m margin]
specifies an empty border, in printer's points, that
    picasso will place around each picture. This may be useful at times to prevent too tight clipping against adjacent text or the edge of the paper. By default no margin is supplied; for example, to cause a 1/8" (9-point) margin, specify -m9(.)

    [-x]
suppresses the default scaling and centering.

    [-L]
packages the output with additional PostScript to cause the picture
    to be rotated by 90 degrees from the default orientation when printed.

The picasso picture description language is object oriented, the basic objects being arrow(,) arc(,) box(,) circle(,) ellipse(,) line(,) sector(,) spline(,) (to include an Encapsulated PostScript file), and (quoted) text. These can be combined, hierarchically, into blocks(.) Primitive objects can be drawn with solid(,) dashed(,) dotted(,) or edges. These edges may be of varying (thickness) and of any shade of gray (from black = 0 to white = 1) or color. The predefined colors are black(,) white(,) red(,) green(,) blue(,) cyan(,) magenta(,) and yellow(.)

Objects may be named and referred to by name or by anonymous references such as 1st box, 4th object, or 2nd last circle. Object names require an initial upper case letter; names beginning with lower case or an underscore are numeric variables. There are a number of predefined variables such as circlerad(,) boxwid(,) linecolor(.) picasso provides a limited set of programming language constructs (loops, if statements, macros, some arithmetic) for combining simple objects into relatively complex pictures.

By default, objects are placed on the page adjacent to each other and from left to right. The default direction may be changed, and any object can be placed a specific position, given either in absolute coordinates or by reference to other objects and points of interest. Any object has a top(,) bottom(,) left(,) and point; these points may also be referred to directionally as north(,) south(,) west(,) and (or n(,) s(,) w(,) and e().) The ``corner'' points may also be specified, e.g., or nw(.) Lines have and points; you may also refer to 1st(,) points along a line. Boxes, circles, and ellipses have eight predefined points corresponding to the directional references mentioned above, the first point being in the eastern direction and the 8th point towards the southeast. For any object, the ``corner'' points really lie on the corners of a box surrounding the object while the ``counted'' points lie on the object itself. This distinction is normally relevant only for circles and ellipses, but since an object can be rotated or otherwise transformed it occasionally has significance for other objects as well.

EXAMPLE
The following is a simple no-smoking sign described in the picasso language.
    .PS
    d = 0.5
    [ box ht d wid 3.5 weight d/20
      box ht d wid d/2 filled 0.5 noedge
      spline weight 0.2 edge .75 right d then up d \
                            then right d then up d
    ]
    linecolor = red; lineweight = 0.375
    circle rad 3 at last block
    line from last circle .4th to last circle .8th
    .PE
If this is used in a troff document and processed through picasso with the [-t] flag, the marking the start of the picture can specify the size and placement of the picture at that point in your document. For example, to place the no smoking sign centered on the page in a 3 inch square area, flag the start of the picture with .PS 3 3 c"(.)

BUGS
picasso is not completely compatible with pic(1). Besides having a number of new keywords and predefined variable names, picasso also centers pictures on a page rather than placing them at upper left.

The interactive version is unable to generate many elements of the language, nor will it preserve such elements (e.g., loops) if they are read in then written out.

SEE ALSO
troff(1), pic(1), troff(5)

REFERENCES
R. L. Drechsler and A. R. Wilks, PostScript Pictures in Troff Documents

B. W. Kernighan, PIC — A Graphics Language for Typesetting

N-P. Nelson, Picasso 1.0 — An OPEN LOOK Drawing Program