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