RECTF(3R)

NAME
rectf - perform function on Rectangle in Bitmap

SYNOPSIS
#include <dmd.h>

void rectf (b, r, f)
Bitmap *b;
Rectangle r;
Code f;

DESCRIPTION
The rectf function performs the action specified by the function Code f on the Rectangle r within the Bitmap *b.

EXAMPLE
The following routine will ``doodle'' on the screen using a Rectangle.

    #include <dmd.h>
    int request();
    int wait();
    Point add();
    void rectf();
    main()
    {
        Rectangle r;
        Point s;
        s.x = 16;
        s.y = 16;
        request (MOUSE);
        for (wait(MOUSE); !button3();
          wait(MOUSE)){
            r.origin = mouse.jxy;
            r.corner = add (r.origin, s);
            if( button1() )
                rectf (&display, r, F_STORE);
            if( button2() )
                rectf (&display, r, F_CLR);
        }
    }

SEE ALSO
jrectf(3R), structures(3R).