Annotation of researchv10dc/630/man/src/p_man/man3/jrectf.3l, revision 1.1.1.1

1.1       root        1: .ds ZZ DEVELOPMENT PACKAGE
                      2: .TH JRECTF 3L "630 MTG"
                      3: .XE "jrectf()"
                      4: .SH NAME  
                      5: jrectf \- rectangle function on display
                      6: .SH SYNOPSIS
                      7: .B #include <dmd.h>
                      8: .sp
                      9: .B void jrectf (r, f) 
                     10: .br 
                     11: .B Rectangle r;
                     12: .br
                     13: .B Code f;
                     14: .SH DESCRIPTION
                     15: The
                     16: .I jrectf
                     17: function
                     18: performs the action specified by the Code
                     19: .I f
                     20: on the Rectangle
                     21: .I r
                     22: in the display bitmap.
                     23: The Rectangle
                     24: .I r
                     25: is in window coordinates.
                     26: .SH EXAMPLE
                     27: The following subroutine will ``doodle'' on the screen using a Rectangle,
                     28: whose coordinates are scaled to the window.
                     29: .PP
                     30: .RS 3
                     31: .ft CM
                     32: .nf
                     33: #include <dmd.h>
                     34: 
                     35: Point add();
                     36: 
                     37: rectdoodle()
                     38: {
                     39:      Rectangle r;
                     40:      Point s;
                     41: 
                     42:      s.x = 16;
                     43:      s.y = 16;
                     44:      request (MOUSE);
                     45:      for (;;) {
                     46:           wait(MOUSE)
                     47:           r.origin = mouse.jxy;
                     48:           r.corner = add (r.origin, s);
                     49:           if ( button3() )
                     50:              break;
                     51:           if ( button1() )
                     52:              jrectf (r, F_STORE);
                     53:           if ( button2() )
                     54:              jrectf (r, F_CLR);
                     55:      }
                     56: }
                     57: .fi
                     58: .ft R
                     59: .RE
                     60: .SH SEE ALSO
                     61: globals(3R), rectf(3R), 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.