|
|
1.1 ! root 1: .TH BITBLT 3 ! 2: .CT 2 graphics ! 3: .SH NAME ! 4: Code, bitblt, point, rectf, screenswap, segment, texture \- graphics functions ! 5: .SH SYNOPSIS ! 6: .B #include <jerq.h> ! 7: .PP ! 8: .B typedef int Code; ! 9: .br ! 10: .B "Code F_STORE, F_XOR, F_OR, F_CLR; ! 11: .PP ! 12: .B void bitblt(sb, r, db, p, f) ! 13: .B "Bitmap *sb, *db; Rectangle r; Point p; Code f; ! 14: .PP ! 15: .B void point(b, p, f) ! 16: .B "Bitmap *b; Point p; Code f; ! 17: .PP ! 18: .B int getpoint(b, p) ! 19: .B "Bitmap *b; Point p; ! 20: .PP ! 21: .B void rectf(b, r, f) ! 22: .B "Bitmap *b; Rectangle r; Code f; ! 23: .PP ! 24: .B void screenswap(b, r, s) ! 25: .B "Bitmap *b; Rectangle r, s; ! 26: .PP ! 27: .B void segment(b, p, q, f) ! 28: .B "Bitmap *b; Point p, q; Code f; ! 29: .PP ! 30: .B void texture(b, r, t, f) ! 31: .B "Bitmap *b; Rectangle r; Texture *t; Code f; ! 32: .SH DESCRIPTION ! 33: The type ! 34: .B Code ! 35: tells the graphics primitives what ! 36: operation perform. ! 37: The possible values are: ! 38: .nf ! 39: .IP ! 40: .de fx ! 41: \f5\&\\$1 \fI\\$2 \&\f5\\$3\fI \\$4 ! 42: .. ! 43: .ta \w'\f5F_STORE\ 'u +\w'\fItarget 'u +\w'\f5&=\fI 'u ! 44: .fx F_STORE target = source ! 45: .fx F_OR target |= source ! 46: .fx F_XOR target ^= source ! 47: .fx F_CLR target &= ~source ! 48: .fi ! 49: .DT ! 50: .PP ! 51: In other words, if a ! 52: Rectangle ! 53: is copied to another place with Code ! 54: .BR F_OR , ! 55: the result will be the bitwise ! 56: OR of the contents of the source ! 57: Rectangle ! 58: and the target area. ! 59: For operations with no explicit source, such as line drawing, ! 60: the source is taken to be an infinite bitmap with zeroes everywhere ! 61: except on the object (e.g. line) generated by the operator, ! 62: with coordinates aligned with the destination bitmap. ! 63: .B F_STORE ! 64: is the same as ! 65: .B F_OR ! 66: for non-rectangular operations. ! 67: .PP ! 68: .I Bitblt ! 69: (bit-block transfer) ! 70: copies the data in Rectangle ! 71: .I r ! 72: in Bitmap ! 73: .I sb ! 74: to the congruent Rectangle with ! 75: .I origin ! 76: .I p ! 77: in Bitmap ! 78: .IR db . ! 79: The nature of the copy is specified by the Code ! 80: .IR f . ! 81: .PP ! 82: .I Point ! 83: draws the pixel at location ! 84: .I p ! 85: in the Bitmap ! 86: .I b ! 87: according to ! 88: .I Code ! 89: .IR f . ! 90: .PP ! 91: .I Getpoint ! 92: returns the value of the pixel at location ! 93: .I p ! 94: in the Bitmap ! 95: .IR b . ! 96: .PP ! 97: .I Screenswap ! 98: does an in-place exchange of the on-screen Rectangle ! 99: .I s ! 100: and the Rectangle ! 101: .I r ! 102: within the Bitmap ! 103: .IR b . ! 104: Its action is undefined if ! 105: .I r ! 106: and ! 107: .I s ! 108: are not congruent. ! 109: The Rectangle ! 110: .I s ! 111: is not ! 112: clipped to ! 113: the Bitmap ! 114: .IR b , ! 115: only to the screen. ! 116: .PP ! 117: .I Segment ! 118: draws a line segment in Bitmap ! 119: .I b ! 120: from Point ! 121: .I p ! 122: to ! 123: .IR q , ! 124: with Code ! 125: .IR f . ! 126: The segment is half-open: ! 127: .I p ! 128: is the first point of the segment and ! 129: .I q ! 130: is the first point beyond the segment, ! 131: so adjacent segments sharing endpoints abut. ! 132: Like all the other graphics operations, ! 133: .I segment ! 134: clips the line so that only the portion of the line intersecting the ! 135: bitmap is displayed. ! 136: .PP ! 137: .I Texture ! 138: draws, with function ! 139: .I f ! 140: in the Rectangle ! 141: .IR r ! 142: in Bitmap ! 143: .IR b , ! 144: the ! 145: Texture specified by ! 146: .IR t . ! 147: The texture is replicated to cover ! 148: .IR r . ! 149: .I Rectf ! 150: is equivalent to ! 151: .I texture ! 152: with ! 153: .I *t ! 154: set to all one's. ! 155: .SH SEE ALSO ! 156: .IR types (5)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.