NAME

     idraw - drawing editor


SYNOPSIS

     idraw [options] [file]


DESCRIPTION

     You  can  use  idraw  to create and edit drawings containing
     graphics like text, lines,  splines,  rectangles,  polygons,
     and  ellipses.   Drawings  are  stored  in files that can be
     printed on a PostScript printer.  You can can open an exist-
     ing  drawing  when starting up idraw by typing a filename on
     the command line.  The editor displays a portrait  or  land-
     scape  view of an 8.5 by 11 inch page with a set of tools on
     the left side of the view and a set of pulldown menus  along
     the  top  of  the  view.  The panner, a box in idraw's lower
     left corner containing  four  arrows,  two  buttons,  and  a
     slider,  allows you to pan and zoom the view of the drawing.


ARGUMENTS

     In addition to  the  standard  InterViews  library  options,
     idraw also accepts the options listed below:

     -s   Create  a  small  view  showing  about  one half of the
          8.5x11 drawing area (the default).

     -l   Create a large view showing the entire  8.5x11  drawing
          area.


X DEFAULTS

     You  can  customize  the  number of undoable changes and the
     font, brush, pattern, or color menus by setting resources in
     your   X   defaults  database.   Each  string  of  the  form
     ``idraw.resource:definition'' sets a resource.

     If you want to customize any of the paint menus, you  set  a
     resource  given  by the concatenation of the menu's name and
     the entry's number, such  as  ``idraw.pattern8'',  for  each
     entry that you want to override.  All menus use the number 1
     for the first entry.  You have to set resources only for the
     entries  that you want to override, not all of them.  If you
     want to add entries to the menus, you simply  set  resources
     for  them,  but  don't skip any numbers after the end of the
     menu because the menu will stop growing at the  first  unde-
     fined  resource  it  finds.   If  you want to shorten a menu
     instead of extending it, defining  a  blank  string  as  the
     resource  for  an  entry  will truncate the menu before that
     entry.

     Idraw understands the following resources:

     history
          Set the maximum  number  of  undoable  changes  (20  by
          default).

     initialfont
          Set  which  font  will  be  the initial font when idraw
          starts up.  Give a number which identifies the font  by
          its  position  in the Font menu starting from 1 for the
          first entry.

     fonti
          Define a custom font to use for the ith  entry  in  the
          Font menu.  Give three strings separated by whitespace.
          The first string defines the font's  name,  the  second
          string  the  corresponding  print  font,  and the third
          string    the     print     size.      For     example,
          ``idraw.font3:8x13bold  Courier-Bold  13''  defines the
          third font entry.

     initialbrush
          Set which brush will be the initial  brush  when  idraw
          starts up.  Give a number which identifies the brush by
          its position in the Brush menu starting from 1 for  the
          first entry.

     brushi
          Define  a  custom brush to use for the ith entry in the
          Brush menu.  You  usually  give  two  numbers  and  two
          booleans:  a  16-bit  hexadecimal  number to define the
          brush's line style (each 1 bit draws a dash and each  0
          bit  a  gap),  a  decimal integer to define the brush's
          width in pixels, either 0 or  1  to  determine  whether
          lines  start  from  an  arrowhead, and either 0 or 1 to
          determine whether lines end in an  arrowhead.   If  you
          give  only the string ``none'', it defines the nonexis-
          tent brush.  For example, ``idraw.brush2:ffff 1  0  0''
          defines  a  single  pixel  wide  solid line without any
          arrowheads.

     initialpattern
          Set which pattern will  be  the  initial  pattern  when
          idraw  starts  up.   Give a number which identifies the
          pattern by its position in the  Pattern  menu  starting
          from 1 for the first entry.

     patterni
          Define a custom pattern to use for the ith entry in the
          Pattern menu.  You can specify the pattern from a 16x16
          bitmap, a 8x8 bitmap, a 4x4 bitmap, a grayscale number,
          or the string ``none''.  You specify the  16x16  bitmap
          with sixteen 16-bit hexadecimal numbers, the 8x8 bitmap
          with eight 8-bit hexadecimal numbers,  the  4x4  bitmap
          with  a  single  16-bit  hexadecimal  number,  and  the
          grayscale number with a single floating  point  number.
          The floating point number must contain a period to dis-
          tinguish itself from the single hexadecimal number  and
          lie  between  0.0  and  1.0, where 0.0 corresponds to a
          solid pattern and 1.0  to  a  clear  pattern.   On  the
          printer,  the  bitmap  patterns  appear as bitmaps, the
          grayscale patterns appear as halftoned shades, and  the
          ``none''  patterns  never obscure any underlying graph-
          ics.  For example,  ``idraw.pattern8:8421''  defines  a
          diagonally hatched pattern.

     initialfgcolor
          Set  which foreground color will be selected when idraw
          starts up.  Give a number which identifies the color by
          its  position  in  the FgColor menu starting from 1 for
          the first entry.

     fgcolori
          Define a custom color to use for the ith entry  in  the
          FgColor  menu.   Give a string defining the name of the
          color and optionally three decimal  numbers  between  0
          and  65535 following the name to define the red, green,
          and blue components  of  the  color's  intensity.   The
          intensities override the name; that is, idraw will look
          the name up in a window system database of common  col-
          ors  only  if you omit the intensities.  You can define
          shades of gray by using equal proportions of each  pri-
          mary color.  For example, ``idraw.fgcolor8:Indigo 48896
          0 65280'' defines a color which is a mixture of red and
          blue.

     initialbgcolor
          Set  which background color will be selected when idraw
          starts up.  Give a number which identifies the color by
          its  position  in  the BgColor menu starting from 1 for
          the first entry.

     bgcolori
          Define a custom color to use for the ith entry  in  the
          BgColor  menu.  The same rules apply to background col-
          ors as to foreground colors.

     Other users can edit drawings  that  you  make  with  custom
     fonts,  brushes,  patterns,  or  colors because idraw stores
     their definitions with the drawing and recreates  them  when
     it  reads the drawing back in.  However, not all definitions
     work across all machines.  Thick or dashed brushes that work
     on one machine, for example, may become invisible on another
     machine.  They will always work in the printout, however.


DRAWING TOOLS

     The drawing tools lie vertically along  idraw's  left  side.
     Select, Move, Scale, Stretch, Rotate, and Reshape manipulate
     existing graphics.  Magnify makes a part of the view  expand
     to  fill  the  entire  view.   Text,  Line, Multi Line, Open
     Spline, Ellipse, Rectangle, Polygon, and Closed Spline  cre-
     ate  new  graphics.   The  shift key will constrain the last
     group of drawing tools if you press it at the same time  you
     click  the  mouse to begin drawing.  You can set the current
     drawing tool by clicking on  it  or  typing  its  associated
     character.   The current drawing tool highlights itself with
     inverted colors.  Clicking the  left  mouse  button  in  the
     drawing  area  invokes the current drawing tool.  Idraw pro-
     vides the following drawing tools:

     Select
          Select a graphic whether or not it's  already  selected
          and discard all other selections.  If you hold down the
          shift key, Select retains the previous selections while
          including an unselected graphic or excluding a selected
          graphic.  If you press the button outside any  graphic,
          you  can  clear all of the selections or drag a rubber-
          band rectangle around a group of graphics to select all
          of  them  together.   Shortcut:  the right mouse button
          invokes Select while the mouse is in the drawing  area.

     Move Move  graphics from one spot to another.  Shortcut: the
          middle mouse button invokes Move while the mouse is  in
          the drawing area.

     Scale
          Scale graphics about their centers.

     Stretch
          Stretch graphics vertically or horizontally while tying
          down the opposite edge.

     Rotate
          Rotate graphics about their centers  according  to  the
          angle  between two radii: the one defined by the origi-
          nal clicking point and the one defined by  the  current
          dragging point.

     Reshape
          Move  one of a graphic's points and reshape the graphic
          accordingly.  Nothing happens when you try  to  reshape
          an ellipse or circle because they don't have any points
          suitable for dragging.  When you try  to  reshape  some
          text,  you will enter a text editing mode where you can
          change the text with emacs-like keystrokes.   You  will
          terminate  the  mode  when you use the mouse to do any-
          thing like pulling down a  menu  or  reshaping  another
          graphic.

     Magnify
          Magnify the part of the drawing specified by dragging a
          rectangle to fill the entire view.  Idraw limits magni-
          fications  to  powers of two between predefined minimum
          and maximum magnifications.

     Text Create some text.  You click where you want to put  the
          first  line's  upper  left corner and then type as much
          text as you want.  You may use  emacs-style  keystrokes
          to  edit the text as well as enter it.  You will termi-
          nate the mode and create the  text  when  you  use  the
          mouse to do anything.

     Line Create  a  line.   The shift key constrains the line to
          lie on either the vertical or the horizontal axis.

     Multi Line
          Create a set of connected lines.  The  shift  key  con-
          strains  each  segment to lie on either the vertical or
          the horizontal axis.  Any button except the left  mouse
          button terminates the line.

     Open Spline
          Create an open B-spline.  The shift key constrains each
          control point to lie on either the vertical or the hor-
          izontal  axis  with  the  preceding  point.  Any button
          except the left mouse button terminates the spline.

     Ellipse
          Create  an  ellipse.   The  shift  key  constrains  the
          ellipse to the shape of a circle.

     Rectangle
          Create a rectangle.  The shift key constrains the rect-
          angle to the shape of a square.

     Polygon
          Create a polygon.  The shift key constrains  each  side
          to  lie  on either the vertical or the horizontal axis.
          Any button except the left mouse button terminates  the
          polygon.

     Closed Spline
          Create  a  closed  B-spline.   The shift key constrains
          each control point to lie on either the vertical or the
          horizontal  axis  with the preceding point.  Any button
          except the left mouse button terminates the spline.


PULLDOWN MENUS

     The pulldown menus File, Edit, Structure, Font, Brush,  Pat-
     tern, FgColor, BgColor, Align, and Option lie across idraw's
     top.  They contain commands which  you  execute  by  pulling
     down  the menu and releasing the mouse button on the command
     or by typing the character associated with the command.

     The File menu contains the following commands to operate  on
     files:

     New  Destroy  the  current  drawing  and  replace it with an
          unnamed blank drawing.

     Revert
          Reread the  current  drawing,  destroying  any  unsaved
          changes.

     Open...
          Pop  up  a  FileChooser(3I) which you can use to browse
          the file system looking  for  an  existing  drawing  to
          open.

     Save As...
          Save the current drawing in a file whose name you type.

     Save Save the current drawing in the file it came from.

     Print...
          Print the current drawing by sending it through a  pipe
          to a command which you type, such as ``lpr.''  The bold
          rectangular outline (called the page boundary)  appear-
          ing  in  the  drawing area indicates the portion of the
          drawing that will appear on the printed page.

     The Edit menu contains the following commands to edit graph-
     ics:

     Undo Undo  the  last done change to the drawing.  Successive
          Undo commands undo earlier and earlier changes back  to
          the last stored change and then do nothing.

     Redo Redo the last undone change to the drawing.  Successive
          Redo commands redo later and later changes  up  to  the
          first  change  undone by Undo and then do nothing.  Any
          new changes cause all undone changes to be forgotten.

     Cut  Remove the selected graphics from the drawing and place
          them in a file called .clipboard in your home directory
          for later retrieval.

     Copy Copy the selected graphics into the clipboard.

     Paste
          Paste copies of the graphics in the clipboard into  the
          drawing.   Together,  Cut, Copy, and Paste allow you to
          transfer graphics between  multiple  instantiations  of
          idraw  simply  by  cutting graphics out of one view and
          pasting them into another.

     Duplicate
          Duplicate the selected graphics and add the  copies  to
          the drawing.

     Delete
          Destroy the selected graphics.

     Select All
          Select every graphic within the drawing.

     Flip Horizontal, Flip Vertical
          Flip  the  selected  graphics  into their mirror images
          along the horizontal or vertical axes.

     90 Clockwise, 90 CounterCW
          Rotate the selected graphics 90  degrees  clockwise  or
          counterclockwise.

     Precise Move..., Precise Scale..., Precise Rotate...
          Move,  scale, or rotate graphics by exact amounts which
          you type in a dialog box.  You type movements in  units
          of  screen  pixels, scalings in terms of magnifications
          along the axes, and rotations in degrees.

     The Structure menu contains the following commands to modify
     the  structure  of  the drawing, that is, the order in which
     graphics are drawn:

     Group
          Nest the selected graphics in a newly created  picture.
          A picture is just a graphic which contains other graph-
          ics.  Group allows you to build hierarchies  of  graph-
          ics.

     Ungroup
          Dissolve  the  selected  pictures.   Ungroup reverses a
          Group operation.

     Bring To Front
          Bring the selected graphics to the front of the drawing
          so  that  they  are  drawn  on top of (after) the other
          graphics in the drawing.

     Send To Back
          Send the selected graphics to the back of  the  drawing
          so that they are drawn behind (before) the other graph-
          ics in the drawing.

     Number of Graphics
          Count and display in  a  popup  window  the  number  of
          selected  graphics,  recursively  adding  the number of
          graphics nested  inside  pictures  among  the  selected
          graphics.   Select  All  followed by Number of Graphics
          counts the total number of graphics in the drawing.

     The Font menu contains a set of fonts with  which  to  print
     text.  When you set the current font from the menu, you will
     also set all the selected graphics' fonts to that  font.   A
     font  indicator  in the upper right corner displays the cur-
     rent font.

     The Brush menu contains a set of brushes with which to  draw
     lines.   When  you  set the current brush from the menu, you
     will also set all the selected  graphics'  brushes  to  that
     brush.   The  nonexistent  brush  draws  invisible lines and
     nonoutlined graphics.  The arrowhead brushes add  arrowheads
     to  lines',  multi lines', and open splines' starting point,
     ending point, or both.  You  can  freely  stretch  or  scale
     these  graphics  without  affecting the arrowheads' size.  A
     brush indicator in the upper left corner displays  the  cur-
     rent brush.

     The  Pattern  menu  contains a set of patterns with which to
     fill graphics but not text.  Text always appears  solid  but
     you  can use a different color than black to get a halftoned
     shade.  When you set the current pattern from the menu,  you
     will  also  set  all the selected graphics' patterns to that
     pattern.  The nonexistent pattern  draws  unfilled  graphics
     while  the other patterns draw graphics filled with a bitmap
     or a halftoned shade.

     The FgColor and BgColor menus contains a set of colors  with
     which  to  draw graphics and text.  When you set the current
     foreground or background color from the FgColor  or  BgColor
     menu,  you  will  also  set all the selected graphics' fore-
     ground or background colors.  The ``on'' bits in the bitmaps
     for  dashed lines and fill patterns appear in the foreground
     color while the ``off'' bits appear in the background color.
     A  black  and  white printer will print a halftoned shade of
     gray for any color other than black or  white.   The  brush,
     pattern, and font indicators all reflect the current colors.

     The Align menu contains  commands  to  align  graphics  with
     other  graphics.   The  first  graphic  selected stays fixed
     while the  other  graphics  move  in  the  order  they  were
     selected  according  to  the  type of alignment chosen.  The
     last Align command, Align  To  Grid,  aligns  each  selected
     graphic's lower left corner with the nearest point in a grid
     of points spaced every 8 printer's points (one ninth  of  an
     inch).

     The Option menu contains the following commands:

     Reduce
          Reduce  the  magnification  by  a  factor of two so the
          drawing's size decreases by half.

     Enlarge
          Enlarge the magnification by a factor  of  two  so  the
          drawing's size doubles.

     Normal Size
          Set  the  magnification to unity so the drawing appears
          at actual size.

     Reduce to Fit
          Reduce  the  magnification  until  the   drawing   fits
          entirely within the view.

     Center Page
          Center  the  view over the center of the 8.5 by 11 inch
          page.

     Gridding on/off
          Toggle the grid's constraining effect on or off.   When
          gridding  is on, new graphics will use only grid points
          as their points, existing graphics will move  or  scale
          only in grid-sized units, and so forth.

     Grid visible/invisible
          Toggle  the grid's visibility on or off.  When visibil-
          ity is on, idraw draws a grid of equally spaced  points
          behind the drawing.

     Grid spacing...
          Change  the grid spacing to a value (in units of print-
          ers' points of which there are 72.07 to an  inch)  that
          you type in a dialog box.

     Orientation
          Toggle  the  drawing's  orientation.  If the editor was
          formerly showing a portrait view  of  the  drawing,  it
          will  now show a landscape view of the drawing and vice
          versa.


FILES

     ~/.clipboard        clipboard file for copy, cut, and paste


SEE ALSO

     FileChooser(3I), Panner(3I), World(3I)


BUGS

     Idraw allows you to enter the grid spacing only in units  of
     printers'  points.   It  should  allow you to enter the grid
     spacing in units of pixels if you want the  grid  points  to
     coincidence  with  pixels,  avoiding  the  problems  with an
     unevenly spaced grid.

















































Man(1) output converted with man2html