TWB(9.1)                                                 TWB(9.1)

     NAME
          dpic, twb - anti-aliased troff output to picture files

     SYNOPSIS
          fb/dpic [ -o list ] [ -w xmin ymin xmax ymax ] [ -d dpi ] [
          -s stem ] [ file ... ]

          fb/twb [ options ] [ files ]

     DESCRIPTION
          Dpic converts the output of troff(1) into anti-aliased
          images.  Reading input from the named files (default stan-
          dard input), it scan-converts characters using font outlines
          for the Merganthaler Linotron 202 phototypesetter; troff's
          -T202 flag will so apprise it.

          Dpic puts each page of output in a picture file.  Normally
          these files are named page.1, page.2, etc.  Option -sstem
          causes page n to be put in file stem.n.

          Option -wxmin ymin xmax ymax gives pixel coordinates of the
          rectangle in which type is to be set.  The default is -w 0 0
          640 480.  Option -ddpi gives the mapping from troff coordi-
          nates (point sizes, etc.)  to pixel coordinates; dpi is the
          number of dots (pixels) in the output files per inch of
          troff coordinates.  The default is 100 dpi.

          Option -o gives a list of pages to be processed.  By default
          all pages of the input files are converted.

          Dpic interprets several commands copied through using
          troff's \X'...'  escape.

          \X'color r g b a'
               Set the foreground color to r g b a. The arguments are
               numbers between 0 and 255 specifying the red, green,
               blue and alpha (opacity) components of the color.  Sub-
               sequent type and line-art will be set in this color.

          \X'bgcolor r g b a'
               Set the background color to r g b a. Before any type is
               set on any page, it is cleared to this color.

          \X'clear'
               Clear the page to the background color.

          \X'picfile name x y'
               Display a picture file with its upper-right corner at
               pixel (x,y).

     Page 1                       Plan 9             (printed 10/1/20)

     TWB(9.1)                                                 TWB(9.1)

          \X'clrwin x0 y0 x1 y1'
               Set all pixels with x0<=x<=x1 and y0<=y<=y1 to the
               background color.

          \X'border x0 y0 x1 y1'
               Draw a one-pixel-wide rectangle in the foreground
               color.  Opposite corners of the rectangle are at
               (x0,y0) and (x1,y1).

          Twb, the Toastmaster's Workbench, is an rc script that pro-
          vides a rudimentary slide-making interface to dpic . It runs
          the files, (default standard input) through grap, pic, tbl,
          eqn, troff and dpic, passing any options to troff or dpic,
          as appropriate.

          Twb loads the -mtwb macro-package into troff. The following
          macros mostly repackage the nonstandard dpic commands
          described above:

          .CO [r g b a]
               Set the foreground color.  If the arguments are omitted
               the color reverts to its previous setting.  Initially
               the foreground color is (255,255,255,255) (opaque
               white.)

          .BC [r g b a]
               Set the background color.  If the arguments are omitted
               the color reverts to its previous setting.  Initially
               the background color is (0,0,0,0) (transparent black.)

          .CL  Clear the page to the background color.

          .IN picfile x y
               Include a picture file, placing it with its upper-left
               corner at pixel (x,y).

          .CW x0 y0 x1 y1
               Clear a window to the background color.

          .BW x0 y0 x1 y1
               Draw a window border using the foreground color.

          .SL [title]
               Start a new slide with the given title.

     SEE ALSO
          picfile(9.6)

     Page 2                       Plan 9             (printed 10/1/20)