1: /*
   2:  * Copyright (c) 1985 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)line.c	5.2 (Berkeley) 9/21/85";
   9: #endif not lint
  10: 
  11: #include "imp.h"
  12: #include "imPcodes.h"
  13: float obotx = 0.;
  14: float oboty = 0.;
  15: float botx = 2.;
  16: float boty = 2.;
  17: float scalex = 1.;
  18: float scaley = 1.;
  19: line(x0,y0,x1,y1)
  20: {
  21:     putch(imP_CREATE_PATH);
  22:     putwd(2);       /* two coordinates follow */
  23:     putwd((int)((x0-obotx)*scalex+botx));
  24:     putwd((int)((y0-oboty)*scaley+boty));
  25:     putwd((int)((x1-obotx)*scalex+botx));
  26:     putwd((int)((y1-oboty)*scaley+boty));
  27:     putch(imP_DRAW_PATH);
  28:     putch(15);      /* "black" lines */
  29:     imPx = x1;
  30:     imPy = y1;
  31: }
  32: putch(c)
  33: {
  34:     putc(c, stdout);
  35: }
  36: putwd(w)
  37: {
  38:     putch(w>>8);
  39:     putch(w);
  40: }

Defined functions

putwd defined in line 36; used 11 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1986-01-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 977
Valid CSS Valid XHTML 1.0 Strict