home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sonderh1 / line.pas < prev    next >
Pascal/Delphi Source File  |  1987-03-13  |  1KB  |  26 lines

  1. (*-------------------------------------------------------------------------*)
  2. (*                              LINE.PAS                                   *)
  3. (*        Linie zeichnen mit Hilfe des mit Include spez. Algorithmus       *)
  4. (*-------------------------------------------------------------------------*)
  5.  
  6. PROCEDURE Line (x1: x_Koord; y1: y_Koord; x2: x_Koord; y2: y_Koord);
  7.  
  8. VAR x1_sys, y1_sys, x2_sys, y2_sys: INTEGER;
  9.  
  10. BEGIN
  11.   Pen_Xpos := x2;          (* Pos. des 'Stiftes' fuer rel. Zeichnen merken *)
  12.   Pen_Ypos := y2;
  13.                        (* Grafikkoordinaten in Systemkoordinaten umrechnen *)
  14.   x1_sys := x1 + ScreenXmin_Sys;  y1_sys := y1 + ScreenYmin_Sys;
  15.   x2_sys := x2 + ScreenXmin_Sys;  y2_sys := y2 + ScreenYmin_Sys;
  16.   IF Origin_is_Top THEN     (* y-Koordinaten bei anderem Ursprung spiegeln *)
  17.   BEGIN
  18.     y1_sys := ScreenYmax_Sys - y1_sys;
  19.     y2_sys := ScreenYmax_Sys - y2_sys;
  20.   END;
  21.   do_line(x1_sys, y1_sys, x2_sys, y2_sys);    (* schliessl. Linie zeichnen *)
  22. END;
  23.  
  24. (*-------------------------------------------------------------------------*)
  25. (*                        Ende von LINE.PAS                                *)
  26.