SEGMENT(3R)

NAME
segment - draw a line segment in a Bitmap

SYNOPSIS
#include <dmd.h>

void segment (b, p, q, f)
Bitmap *b;
Point p, q;
Code f;

DESCRIPTION
The segment utility draws a line segment in Bitmap b from Point p to Point q with function Code f.

Like all the other graphics operations, segment clips the line so that only the portion of the line intersecting the Bitmap is displayed.

EXAMPLE
The following call simply draws a line connecting a window's origin Point to its corner Point (a diagonal line from the upper left corner to the lower right corner of the window).

    #include <dmd.h>
    connectcorners()
    {
    	segment (&display, Drect.origin,
     	       Drect.corner, F_XOR);
    }

SEE ALSO
jsegment(3R).