Previous: polygon Up: ../slides.html Next: polymarker


POLYLINE

 POLYLINE LAST
 or
 POLYLINE <ABSOLUTE|RELATIVE>
 ...three or more x y z point coordinates...
 ENDPOLYLINE

 In the first  form of  this command,  the last  polyline is  replotted,
 which is most useful if it was defined as a relative polyline.  In this
 way, pairs  of MOVE  and POLYLINE  LAST commands  can be  used to  plot
 several instances of the  same polyline without  having to reenter  its
 coordinates.

 In the  second form,  the keywords  ABSOLUTE and  RELATIVE specify  the
 polyline type, with ABSOLUTE assumed  if neither keyword is  specified.
 The following lines then specify the polyline coordinates (x,y,z),  one
 point per line, with the  list terminated by  the ENDPOLYLINE  command.

 Line segments are drawn  from the current point  to the first  polyline
 point, then between successive  points of the polyline  up to the  last
 one.  This was an unfortunate choice in the CORE proposal, for it means
 that a polyline command  does not define  a constant graphical  object,
 but instead must be prefixed by  a move command to supply the  starting
 current point.   For  a relative  polyline,  each coordinate  point  is
 relative  to  the  new  current  point  established  by  the  preceding
 coordinate point.

 The polyline coordinates are saved internally in a buffer of fixed size
 (currently 256 entries); if more  coordinates are entered, excess  ones
 except the last are  discarded, and a warning  message is issued.   The
 truncated polyline will still be  plotted, however.  The POLYLINE  LAST
 command can later  to issued to  plot the same  polyline again  without
 having to reenter its coordinates.

 Any coordinate scale factors in effect at the time a relative  polyline
 is plotted are temporarily  applied to the  coordinate values, but  the
 original coordinates  are  restored  after  the  polyline  is  actually
 plotted.  This can be useful with  the POLYLINE LAST command to  obtain
 multiple instances of a polyline with varying scale.