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

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH JCIRCLE 3L "630 MTG"
        !             3: .XE "jcircle()"
        !             4: .XE "jdisc()"
        !             5: .XE "jarc()"
        !             6: .SH NAME
        !             7: jcircle, jdisc, jarc \- draw circle on display
        !             8: .SH SYNOPSIS
        !             9: .B #include <dmd.h>
        !            10: .sp
        !            11: .B void jcircle (p, r, f)
        !            12: .PP
        !            13: .B void jdisc (p, r, f)
        !            14: .PP
        !            15: .B void jarc (p, p1, p2, f)
        !            16: .PP
        !            17: .B Point p, p1, p2;
        !            18: .br
        !            19: .B int r;
        !            20: .br
        !            21: .B Code f;
        !            22: .SH DESCRIPTION
        !            23: The
        !            24: .I jcircle
        !            25: function
        !            26: draws 
        !            27: the approximate circle of radius
        !            28: .I r
        !            29: centered at
        !            30: .I p
        !            31: with Code
        !            32: .IR f 
        !            33: in the 
        !            34: display bitmap.
        !            35: .PP
        !            36: The
        !            37: .I jdisc
        !            38: function
        !            39: draws a disc of radius
        !            40: .I r
        !            41: centered at
        !            42: .I p
        !            43: with Code
        !            44: .IR f 
        !            45: in the 
        !            46: display bitmap.
        !            47: .PP
        !            48: The
        !            49: .I jarc
        !            50: function
        !            51: draws the circular arc centered at
        !            52: .I p
        !            53: counterclockwise from
        !            54: .I p1
        !            55: to the point on the circle closest to
        !            56: .I p2
        !            57: with Code
        !            58: .IR f 
        !            59: in the 
        !            60: display bitmap.
        !            61: .PP
        !            62: All coordinates and radii are in window coordinates.
        !            63: Because the window is scaled,
        !            64: these routines are actually implemented by calls to the ellipse routines.
        !            65: .SH EXAMPLE
        !            66: The following routine draws a row of eight circles,
        !            67: a row of eight discs, and a row of eight arcs, scaled
        !            68: to the shape of the window.
        !            69: .PP
        !            70: .RS 3
        !            71: .ft CM
        !            72: .nf
        !            73: #include <dmd.h>
        !            74: 
        !            75: draw()
        !            76: {
        !            77:   Point p;
        !            78:   int i, r;
        !            79: 
        !            80:   r = 50;
        !            81:   p.y = 200;
        !            82:   for (p.x=100; p.x < XMAX-50; p.x+=120)
        !            83:        jcircle (p, r, F_XOR);
        !            84:   p.y = 600;
        !            85:   for (p.x=100; p.x < XMAX-50; p.x+=120)
        !            86:        jdisc (p, r, F_XOR);
        !            87:   p.y = 900;
        !            88:   for (p.x=100; p.x < XMAX-50; p.x+=120)
        !            89:        jarc (p, Pt(p.x-r, p.y), Pt(p.x+r,
        !            90:              p.y), F_XOR);
        !            91: 
        !            92:   request(KBD);
        !            93:   wait(KBD);
        !            94: }
        !            95: .fi
        !            96: .ft R
        !            97: .RE
        !            98: .SH SEE ALSO
        !            99: circle(3L), ellipse(3L), globals(3R), jellipse(3L),
        !           100: structures(3R), transform(3R/3L).

unix.superglobalmegacorp.com

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