# 2.11BSD#431 - /usr/src/usr.lib/libplot/imagen/line.c

##### Functions

    line              X
    putch             X
    putwd             X

##### Variables

    botx              X
    boty              X
    obotx             X
    oboty             X
    scalex            X
    scaley            X

       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

line defined in line 19; used 2 times

- in /usr/src/usr.lib/libplot/imagen/cont.c line 15
- in /usr/src/usr.lib/libplot/imagen/point.c line 12

putch defined in line 32; used 25 times

- in line 21, 27-28(2), 38-39(2)
- in /usr/src/usr.lib/libplot/imagen/close.c line 15
- in /usr/src/usr.lib/libplot/imagen/erase.c line 15
- in /usr/src/usr.lib/libplot/imagen/label.c line 18-25(3)
- in /usr/src/usr.lib/libplot/imagen/open.c line 16-29(10), 35-40(5)

putwd defined in line 36; used 11 times

- in line 22-26(5)
- in /usr/src/usr.lib/libplot/imagen/label.c line 19-21(2)
- in /usr/src/usr.lib/libplot/imagen/open.c line 22-30(4)

#### Defined variables

botx defined in line 15; used 6 times

- in line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 19
- in /usr/src/usr.lib/libplot/imagen/line.c line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/space.c line 22

boty defined in line 16; used 6 times

- in line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 21
- in /usr/src/usr.lib/libplot/imagen/line.c line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/space.c line 23

obotx defined in line 13; used 6 times

- in line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 19
- in /usr/src/usr.lib/libplot/imagen/line.c line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/space.c line 24

oboty defined in line 14; used 6 times

- in line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 21
- in /usr/src/usr.lib/libplot/imagen/line.c line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/space.c line 25

scalex defined in line 17; used 8 times

- in line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 19-24(2)
- in /usr/src/usr.lib/libplot/imagen/line.c line 23-25(2)
- in /usr/src/usr.lib/libplot/imagen/scale.c line 28
- in /usr/src/usr.lib/libplot/imagen/space.c line 28

scaley defined in line 18; used 7 times

- in line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/label.c line 21
- in /usr/src/usr.lib/libplot/imagen/line.c line 24-26(2)
- in /usr/src/usr.lib/libplot/imagen/scale.c line 29
- in /usr/src/usr.lib/libplot/imagen/space.c line 29

sccsid defined in line 8; never used

Last modified: 1987-02-18 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 949 |