/* TEACH GO_POLYLINE                          Ben Rabau, 27th Aug 1993

This file shows a few examples of lines and arrows.
The lines can be simple, or expanded into polylines and polyline-arrows
(see also TEACH * GO_POLYGON, REF * GO_POLYLINE and TEACH * GO_POLYARROW)

For more general detailed information see

HELP * GO
REF * GO

 */

;;; Requires the following files to be loaded:
uses go;
uses go_polyline.p;

;;; It also requires the GO window to be active:
go_init_rc();

;;; To create a few lines and arrows do:
vars line1 =newgo_polyline();  go_centre_to(-100, 100,line1);
vars line2 =newgo_polyline();  go_centre_to(-100,-100,line1);
vars arrow1=newgo_polyarrow(); go_centre_to( 100, 100,arrow1);
vars arrow2=newgo_polyarrow(); go_centre_to( 100,-100,arrow2);

go_add_to( line1,  go_default_pane );
go_add_to( line2,  go_default_pane );
go_add_to( arrow1, go_default_pane );
go_add_to( arrow2, go_default_pane );

;;; The first thing you might want to do is to stretch or move them:
go_make_editable(line1);
go_make_editable(line2);
go_make_editable(arrow1);
go_make_editable(arrow2);

;;; An interesting idea is to be able to extend the line into a polyline
;;; with more points. This means for the arrow that the arrow heads are
;;; no longer depending on the same line go_orientation, but on the go_orientation
;;; of the first and last line segments. Note that some editors might
;;; overlap each other...

4 -> go_npoints(line1);
5 -> go_npoints(arrow1);

;;; If you want to see what it looks like without the editors (little triangles)
;;; then you can do:
go_make_uneditable(line1);
go_make_uneditable(line2);
go_make_uneditable(arrow1);
go_make_uneditable(arrow2);

;;; eof

--- C.all/lib/proto/go/teach/go_polyline
--- Copyright University of Sussex 1993. All rights reserved.
