(****************************************************************************)
(*                                                                          *)
(*                           GSX Line Module                                *)
(*                           ===============                                *)
(* This Module contains all procedures to draw lines and set their attri-   *)
(* butes.                                                                   *)
(*                                                                          *)
(* 16.5.1988          Wolfgang Muees, Hagenring 22, 3300 Braunschweig       *)
(*                                                                          *)
(****************************************************************************)

CONST
  full     = 1;        dash    = 2;                (* Available linetypes *)
  dot      = 3;        dashdot = 4;
  longdash = 5;

PROCEDURE PolyLine ( Number : INTEGER; VAR Points );
                                        (* Draw a polyline with selected type, width
                                           and color. *)
BEGIN
  numPTS ( 6, Number, Points );
END;


PROCEDURE DrawArc ( X, Y, Radius, Startangle, Endangle : INTEGER );
                                        (* Draw an arc with center point X, Y and Radius.
                                           Angles in [0..3600], Startangle <= Endangle.*)
BEGIN
  PTSIN[1].X := X;
  PTSIN[1].Y := Y;
  PTSIN[4].X := Radius;
  INTIN[1]   := Startangle;
  INTIN[2]   := Endangle;
  WITH CB DO
    BEGIN
      PINLEN := 4;
      IINLEN := 2;
      ESCID  := 2;
    END;
  simple ( 11 );
END;


PROCEDURE LineType ( LType : INTEGER );   (* Sets linetypes defined above *)
BEGIN
  oneINT ( 15, LType );
END;


PROCEDURE LineWidth ( Width : INTEGER );  (* Tries to change line width. Most devices
                                              don't support this. *)
BEGIN
  PTSIN[1].X := Width;
  CB.PINLEN  := 1;
  simple ( 16 );
END;


PROCEDURE LineColor ( Color : INTEGER );  (* Sets a color index for lines and arcs. *)
BEGIN
  oneINT ( 17, Color );
END;

