Annotation of researchv10dc/630/man/src/p_man/man3/point.3r, revision 1.1

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH POINT 3R "630 MTG"
        !             3: .XE "point()"
        !             4: .SH NAME
        !             5: point \- draw a single pixel in a Bitmap
        !             6: .SH SYNOPSIS
        !             7: .ft B
        !             8: #include <dmd.h>
        !             9: .sp
        !            10: void point (b, p, f)
        !            11: .br
        !            12: Bitmap \(**b;
        !            13: .br
        !            14: Point p;
        !            15: .br
        !            16: Code f;
        !            17: .SH DESCRIPTION
        !            18: The
        !            19: .I point
        !            20: function
        !            21: draws the pixel at Point
        !            22: .I p
        !            23: in the Bitmap
        !            24: .I \(**b
        !            25: according to function Code
        !            26: .IR f .
        !            27: .SH EXAMPLE
        !            28: The following program determines the Point at the middle of
        !            29: the window and draws it.  Hitting any key 
        !            30: will exit the program.
        !            31: .PP
        !            32: .RS 3
        !            33: .nf
        !            34: .ft CM
        !            35: #include <dmd.h>
        !            36: 
        !            37: Point middle();
        !            38: Point add();
        !            39: Point div();
        !            40: Point sub();
        !            41: 
        !            42: main()
        !            43: {
        !            44:        Point centerdot;
        !            45:        
        !            46:        centerdot = middle();
        !            47:        point (&display, centerdot, F_XOR);     
        !            48:        request(KBD);
        !            49:        wait(KBD);
        !            50: }
        !            51: 
        !            52: Point middle()
        !            53: {
        !            54:        Point center, offset;
        !            55: 
        !            56:        offset = div (sub (Drect.corner,
        !            57:                Drect.origin), 2);
        !            58:        center = add (Drect.origin, offset);
        !            59: 
        !            60:        return center;
        !            61: }
        !            62: \fR
        !            63: .fi
        !            64: .RE
        !            65: .SH SEE ALSO
        !            66: jpoint(3R).

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.