Annotation of researchv10dc/630/man/src/p_man/man3/fpt.3l, revision 1.1

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH FPT 3L "630 MTG"
        !             3: .XE "fPt()"
        !             4: .XE "fRpt()"
        !             5: .XE "fRect()"
        !             6: .SH NAME
        !             7: fpt: fPt, fRpt, fRect \- create a Point or Rectangle from arguments
        !             8: .SH SYNOPSIS
        !             9: .ft B
        !            10: #include <dmd.h>
        !            11: .sp
        !            12: Point fPt (x, y)
        !            13: .br
        !            14: int x, y;
        !            15: .sp
        !            16: Rectangle fRpt (p, q)
        !            17: .br
        !            18: Point p, q;
        !            19: .sp
        !            20: Rectangle fRect (a, b, c, d)
        !            21: .br
        !            22: int a, b, c, d;
        !            23: 
        !            24: .SH DESCRIPTION
        !            25: .PP
        !            26: The
        !            27: .I fPt
        !            28: function returns a point made from the two arguments.
        !            29: .PP
        !            30: The
        !            31: .I fRpt
        !            32: function returns a rectangle made from the two points.
        !            33: .PP
        !            34: The
        !            35: .I fRect
        !            36: function returns a rectangle made from the four arguments.
        !            37: This function differs from \fIcanon(3R)\fR in that the points are not sorted first
        !            38: to guarantee a positive area.
        !            39: .PP
        !            40: The above functions are not macros as are the ones in \fIpt(3L)\fR; therefore,
        !            41: allow C language assignment constructs.
        !            42: .SH EXAMPLE
        !            43: The following subroutine draws two boxes in the upper
        !            44: left corner of the window.
        !            45: .nf
        !            46: .ft CM
        !            47: #include <dmd.h>
        !            48: 
        !            49: Point fPt();
        !            50: Rectangle fRpt();
        !            51: Rectangle fRect();
        !            52: 
        !            53: Point add();
        !            54: Rectangle raddp();
        !            55: 
        !            56: drawboxes()
        !            57: {
        !            58:        Rectangle r;
        !            59:        
        !            60:        r = fRpt(Drect.origin, add(Drect.origin, Pt(100,100)));
        !            61:        box(&display, r, F_STORE);
        !            62: 
        !            63:        r = fRect(0,0,200,200);
        !            64:        box(&display, raddp(r, Drect.origin), F_STORE);
        !            65: }
        !            66: \fR
        !            67: .fi
        !            68: .RE
        !            69: .SH SEE ALSO
        !            70: canon(3R), pt(3L).

unix.superglobalmegacorp.com

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