TEXTURE(3R)

NAME
texture - draw Texture16 in Rectangle in Bitmap

SYNOPSIS
#include <dmd.h>

void texture (b, r, t, f)
Bitmap *b;
Rectangle r;
Texture16 *t;
Code f;

Texture16 T_grey, T_lightgrey, T_darkgrey;

Texture16 T_black, T_white, T_background, T_checks;

DESCRIPTION
The texture function draws the Texture16 specified by t with function Code f in the Rectangle r in the Bitmap b. The Texture16s listed above are predefined.

EXAMPLE
The following program allows doodling with a Texture16.

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

SEE ALSO
globals(3R), jtexture(3L), structures(3R).