JTEXTURE(3L)

NAME
jtexture - draw Texture in Rectangle on display

SYNOPSIS
#include <dmd.h>

void jtexture (r, t, f)
Rectangle r;
Texture16 *t;
Code f;

Texture16 T_grey, T_lightgrey, T_darkgrey;

Texture16 T_black, T_white, T_background, T_checks;

DESCRIPTION
The jtexture function fills the Rectangle r in the display Bitmap with Texture16 t using function Code f. The Rectangle r is in window coordinates. The Texture16s listed above are predefined.

EXAMPLE
The following routine allows one to doodle with a Texture16.

    #include <dmd.h>
    Point add();
    main()
    {
        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() )
              jtexture (r, &T_grey, F_STORE);
            if ( button2() )
              jtexture (r, &T_grey, F_CLR);
        }
    }

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