JRECTF(3L)

NAME
jrectf - rectangle function on display

SYNOPSIS
#include <dmd.h>

void jrectf (r, f)
Rectangle r;
Code f;

DESCRIPTION
The jrectf function performs the action specified by the Code f on the Rectangle r in the display bitmap. The Rectangle r is in window coordinates.

EXAMPLE
The following subroutine will ``doodle'' on the screen using a Rectangle, whose coordinates are scaled to the window.

    #include <dmd.h>
    Point add();
    rectdoodle()
    {
         Rectangle r;
         Point s;
         s.x = 16;
         s.y = 16;
         request (MOUSE);
         for (;;) {
              wait(MOUSE)
              r.origin = mouse.jxy;
              r.corner = add (r.origin, s);
              if ( button3() )
                 break;
              if ( button1() )
                 jrectf (r, F_STORE);
              if ( button2() )
                 jrectf (r, F_CLR);
         }
    }

SEE ALSO
globals(3R), rectf(3R), structures(3R), transform(3R/3L).