|
|
1.1 root 1: .TH BITBLT 9.3
2: .CT 2 graphics
3: .SH NAME
4: Code, addr, 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 Word *addr(b, p)
13: .B "Bitmap *b; Point p;
14: .PP
15: .B void bitblt(sb, r, db, p, f)
16: .B "Bitmap *sb, *db; Rectangle r; Point p; Code f;
17: .PP
18: .B void point(b, p, f)
19: .B "Bitmap *b; Point p; Code f;
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 zeros 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 Addr
69: returns the address of the Word containing the bit
70: at Point
71: .I p
72: in the Bitmap
73: .IR b .
74: .PP
75: .I Bitblt
76: (bit-block transfer)
77: copies the data in Rectangle
78: .I r
79: in Bitmap
80: .I sb
81: to the congruent Rectangle with
82: .I origin
83: .I p
84: in Bitmap
85: .IR db .
86: The nature of the copy is specified by the Code
87: .IR f .
88: .PP
89: .I Point
90: draws the pixel at location
91: .I p
92: in the Bitmap
93: .I b
94: according to
95: .I Code
96: .IR f .
97: .PP
98: .I Screenswap
99: does an in-place exchange of the on-screen Rectangle
100: .I s
101: and the Rectangle
102: .I r
103: within the Bitmap
104: .IR b .
105: Its action is undefined if
106: .I r
107: and
108: .I s
109: are not congruent.
110: The Rectangle
111: .I s
112: is not
113: clipped to
114: the Bitmap
115: .IR b ,
116: only to the screen.
117: .PP
118: .I Segment
119: draws a line segment in Bitmap
120: .I b
121: from Point
122: .I p
123: to
124: .IR q ,
125: with Code
126: .IR f .
127: The segment is half-open:
128: .I p
129: is the first point of the segment and
130: .I q
131: is the first point beyond the segment,
132: so adjacent segments sharing endpoints abut.
133: Like all the other graphics operations,
134: .I segment
135: clips the line so that only the portion of the line intersecting the
136: bitmap is displayed.
137: .PP
138: .I Texture
139: draws, with function
140: .I f
141: in the Rectangle
142: .IR r
143: in Bitmap
144: .IR b ,
145: the
146: Texture specified by
147: .IR t .
148: The texture is replicated to cover
149: .IR r .
150: .I Rectf
151: is equivalent to
152: .I texture
153: with
154: .I *t
155: set to all one's.
156: .PP
157: In the above definitions, the type Bitmap may
158: be replaced with Layer anywhere; see
159: .IR newlayer (9.2).
160: .SH SEE ALSO
161: .IR types (9.5)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.