|
|
1.1 root 1: .ds ZZ DEVELOPMENT PACKAGE
2: .TH TEXTURE 3R "630 MTG"
3: .XE "texture()"
4: .XE "T_grey"
5: .XE "T_lightgrey"
6: .XE "T_darkgrey"
7: .XE "T_black"
8: .XE "T_white"
9: .XE "T_checks"
10: .XE "T_background"
11: .SH NAME
12: texture \- draw Texture16 in Rectangle in Bitmap
13: .SH SYNOPSIS
14: .ft B
15: #include <dmd.h>
16: .sp
17: void texture (b, r, t, f)
18: .br
19: Bitmap \(**b;
20: .br
21: Rectangle r;
22: .br
23: Texture16 \(**t;
24: .br
25: Code f;
26: .sp
27: Texture16 T_grey, T_lightgrey, T_darkgrey;
28: .sp
29: Texture16 T_black, T_white, T_background, T_checks;
30: .SH DESCRIPTION
31: The
32: .I texture
33: function
34: draws the Texture16 specified by
35: .I t
36: with function Code
37: .I f
38: in the Rectangle
39: .I r
40: in the Bitmap
41: .IR b .
42: The Texture16s listed above are predefined.
43: .SH EXAMPLE
44: The following program allows doodling with a Texture16.
45: .PP
46: .RS 3
47: .nf
48: .ft CM
49: #include <dmd.h>
50: main()
51: {
52: Rectangle r;
53: Point s;
54: s.x = 16;
55: s.y = 16;
56: request (MOUSE);
57: for (;;)
58: {
59: wait(MOUSE);
60: r.origin = mouse.xy;
61: r.corner = add (r.origin, s);
62: if( button3() )
63: break;
64: if( button1() )
65: texture (&display, r,
66: &T_grey, F_STORE);
67: if( button2() )
68: texture (&display, r,
69: &T_grey, F_CLR);
70: }
71: }
72: \fR
73: .fi
74: .RE
75: .SH SEE ALSO
76: globals(3R), jtexture(3L), structures(3R).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.