HELP APPLINE                                    David Young
                                                February 1998

LIB *APPLINE allows a procedure to be applied to every pixel on a
straight line.

-- The procedure appline ----------------------------------------------

appline(X0, Y0, X1, Y1, PROC)
    The first four arguments specify the ends of a line as two
    coordinate pair.

    The last argument is a procedure
        PROC(X, Y)
    of two arguments, which is called for every pair of integers which
    represent the coordinates of a pixel on the line.

-- Example ------------------------------------------------------------

This assumes that you are using X and the *RC_GRAPHIC package is
available.

Set up window and scales:

    uses rc_graphic
    uses popvision
    uses appline
    rc_new_window(200, 200, 100, 100, false);     ;;; start a new window
    0 -> rc_xorigin; 199 -> rc_yorigin;           ;;; origin bottom left
    1 -> rc_xscale; -1 -> rc_yscale;              ;;; conventional
    false -> popradians;                          ;;; will use degrees

and draw lines at 10 degree intervals round the clock, pausing briefly
between each to see that the sequence is correct:

    vars theta;
    for theta from 0 by 10 to 350 do
        appline(100, 100, 100+80*cos(theta), 100+80*sin(theta), rc_drawpoint);
        syssleep(50);
    endfor;

--- $popvision/help/appline
--- Copyright University of Sussex 1998. All rights reserved.
