POINT(3R)

NAME
point - draw a single pixel in a Bitmap

SYNOPSIS
#include <dmd.h>

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

DESCRIPTION
The point function draws the pixel at Point p in the Bitmap *b according to function Code f.

EXAMPLE
The following program determines the Point at the middle of the window and draws it. Hitting any key will exit the program.

    #include <dmd.h>
    Point middle();
    Point add();
    Point div();
    Point sub();
    main()
    {
    	Point centerdot;

    	centerdot = middle();
    	point (&display, centerdot, F_XOR);
    	request(KBD);
    	wait(KBD);
    }
    Point middle()
    {
    	Point center, offset;
    	offset = div (sub (Drect.corner,
    		Drect.origin), 2);
    	center = add (Drect.origin, offset);
    	return center;
    }

SEE ALSO
jpoint(3R).