1mlib_GraphicsDrawPolygon(3MmLeIdBi)aLib Library Functmiloinbs_GraphicsDrawPolygon(3MLIB)
2
3
4
6 mlib_GraphicsDrawPolygon, mlib_GraphicsDrawPolygon_8, mlib_Graphics‐
7 DrawPolygon_32, mlib_GraphicsDrawPolygon_X_8, mlib_GraphicsDrawPoly‐
8 gon_X_32, mlib_GraphicsDrawPolygon_A_8, mlib_GraphicsDrawPolygon_A_32,
9 mlib_GraphicsDrawPolygon_B_8, mlib_GraphicsDrawPolygon_B_32,
10 mlib_GraphicsDrawPolygon_G_8, mlib_GraphicsDrawPolygon_G_32,
11 mlib_GraphicsDrawPolygon_Z_8, mlib_GraphicsDrawPolygon_Z_32,
12 mlib_GraphicsDrawPolygon_AB_8, mlib_GraphicsDrawPolygon_AB_32,
13 mlib_GraphicsDrawPolygon_ABG_8, mlib_GraphicsDrawPolygon_ABG_32,
14 mlib_GraphicsDrawPolygon_ABGZ_8, mlib_GraphicsDrawPolygon_ABGZ_32,
15 mlib_GraphicsDrawPolygon_ABZ_8, mlib_GraphicsDrawPolygon_ABZ_32,
16 mlib_GraphicsDrawPolygon_AG_8, mlib_GraphicsDrawPolygon_AG_32,
17 mlib_GraphicsDrawPolygon_AGZ_8, mlib_GraphicsDrawPolygon_AGZ_32,
18 mlib_GraphicsDrawPolygon_AZ_8, mlib_GraphicsDrawPolygon_AZ_32,
19 mlib_GraphicsDrawPolygon_BG_8, mlib_GraphicsDrawPolygon_BG_32,
20 mlib_GraphicsDrawPolygon_BGZ_8, mlib_GraphicsDrawPolygon_BGZ_32,
21 mlib_GraphicsDrawPolygon_BZ_8, mlib_GraphicsDrawPolygon_BZ_32,
22 mlib_GraphicsDrawPolygon_GZ_8, mlib_GraphicsDrawPolygon_GZ_32 - draw
23 polygon
24
26 cc [ flag... ] file... -lmlib [ library... ]
27 #include <mlib.h>
28
29 mlib_status mlib_GraphicsDrawPolygon_8(mlib_image *buffer,
30 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
31
32
33 mlib_status mlib_GraphicsDrawPolygon_32(mlib_image *buffer,
34 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
35
36
37 mlib_status mlib_GraphicsDrawPolygon_X_8(mlib_image *buffer,
38 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
39 mlib_s32 c2);
40
41
42 mlib_status mlib_GraphicsDrawPolygon_X_32(mlib_image *buffer,
43 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
44 mlib_s32 c2);
45
46
47 mlib_status mlib_GraphicsDrawPolygon_A_8(mlib_image *buffer,
48 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
49
50
51 mlib_status mlib_GraphicsDrawPolygon_A_32(mlib_image *buffer,
52 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
53
54
55 mlib_status mlib_GraphicsDrawPolygon_B_8(mlib_image *buffer,
56 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
57 mlib_s32 c, mlib_s32 a);
58
59
60 mlib_status mlib_GraphicsDrawPolygon_B_32(mlib_image *buffer,
61 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
62 mlib_s32 a);
63
64
65 mlib_status mlib_GraphicsDrawPolygon_G_8(mlib_image *buffer,
66 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
67 const mlib_s32 *c);
68
69
70 mlib_status mlib_GraphicsDrawPolygon_G_32(mlib_image *buffer,
71 const mlib_s16 *x, const mlib_s16 *y,
72 mlib_s32 npoints, const mlib_s32 *c);
73
74
75 mlib_status mlib_GraphicsDrawPolygon_Z_8(mlib_image *buffer,
76 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
77 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
78
79
80 mlib_status mlib_GraphicsDrawPolygon_Z_32(mlib_image *buffer,
81 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
82 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
83
84
85 mlib_status mlib_GraphicsDrawPolygon_AB_8(mlib_image *buffer,
86 const mlib_s16 *x, const mlib_s16 *y,
87 mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
88
89
90 mlib_status mlib_GraphicsDrawPolygon_AB_32(mlib_image *buffer,
91 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
92 mlib_s32 a);
93
94
95 mlib_status mlib_GraphicsDrawPolygon_ABG_8(mlib_image *buffer,
96 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
97 const mlib_s32 *c, mlib_s32 a);
98
99
100 mlib_status mlib_GraphicsDrawPolygon_ABG_32(mlib_image *buffer,
101 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
102 const mlib_s32 *c, mlib_s32 a);
103
104
105 mlib_status mlib_GraphicsDrawPolygon_ABGZ_8(mlib_image *buffer,
106 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
107 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
108
109
110 mlib_status mlib_GraphicsDrawPolygon_ABGZ_32(mlib_image *buffer,
111 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
112 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
113
114
115 mlib_status mlib_GraphicsDrawPolygon_ABZ_8(mlib_image *buffer,
116 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
117 const mlib_s16 *z, mlib_s32 npoints,
118 mlib_s32 c, mlib_s32 a);
119
120
121 mlib_status mlib_GraphicsDrawPolygon_ABZ_32(mlib_image *buffer,
122 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
123 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
124
125
126 mlib_status mlib_GraphicsDrawPolygon_AG_8(mlib_image *buffer,
127 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
128 const mlib_s32 *c);
129
130
131 mlib_status mlib_GraphicsDrawPolygon_AG_32(mlib_image *buffer,
132 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
133 const mlib_s32 *c);
134
135
136 mlib_status mlib_GraphicsDrawPolygon_AGZ_8(mlib_image *buffer,
137 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
138 const mlib_s16 *z, mlib_s32 npoints,
139 const mlib_s32 *c);
140
141
142 mlib_status mlib_GraphicsDrawPolygon_AGZ_32(mlib_image *buffer,
143 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
144 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
145
146
147 mlib_status mlib_GraphicsDrawPolygon_AZ_8(mlib_image *buffer,
148 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
149 const mlib_s16 *z, mlib_s32 npoints,
150 mlib_s32 c);
151
152
153 mlib_status mlib_GraphicsDrawPolygon_AZ_32(mlib_image *buffer,
154 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
155 const mlib_s16 *z, mlib_s32 npoints,
156 mlib_s32 c);
157
158
159 mlib_status mlib_GraphicsDrawPolygon_BG_8(mlib_image *buffer,
160 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
161 const mlib_s32 *c, mlib_s32 a);
162
163
164 mlib_status mlib_GraphicsDrawPolygon_BG_32(mlib_image *buffer,
165 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
166 const mlib_s32 *c, mlib_s32 a);
167
168
169 mlib_status mlib_GraphicsDrawPolygon_BGZ_8(mlib_image *buffer,
170 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
171 const mlib_s16 *z, mlib_s32 npoints,
172 const mlib_s32 *c, mlib_s32 a);
173
174
175 mlib_status mlib_GraphicsDrawPolygon_BGZ_32(mlib_image *buffer,
176 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
177 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
178
179
180 mlib_status mlib_GraphicsDrawPolygon_BZ_8(mlib_image *buffer,
181 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
182 const mlib_s16 *z, mlib_s32 npoints,
183 mlib_s32 c, mlib_s32 a);
184
185
186 mlib_status mlib_GraphicsDrawPolygon_BZ_32(mlib_image *buffer,
187 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
188 const mlib_s16 *z, mlib_s32 npoints,
189 mlib_s32 c, mlib_s32 a);
190
191
192 mlib_status mlib_GraphicsDrawPolygon_GZ_8(mlib_image *buffer,
193 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
194 const mlib_s16 *z, mlib_s32 npoints,
195 const mlib_s32 *c);
196
197
198 mlib_status mlib_GraphicsDrawPolygon_GZ_32(mlib_image *buffer,
199 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
200 const mlib_s16 *z, mlib_s32 npoints,
201 const mlib_s32 *c);
202
203
205 Each of the mlib_GraphicsDrawPolygon_*() functions draws a polygon
206 enclosing (x1,y1), (x2,y2), ..., and (xn,yn).
207
208
209 Each of the mlib_GraphicsDrawPolygon_X_*() functions draws a polygon in
210 Xor mode as follows:
211
212 data[x,y] ^= c ^ c2
213
214
215
216 Each of the mlib_GraphicsDrawPolygon_A_*() functions draws a polygon
217 with antialiasing.
218
219
220 Each of the mlib_GraphicsDrawPolygon_B_*() functions draws a polygon
221 with alpha blending as follows:
222
223 data[x,y] = (data[x,y] * (255 - a) + c * a) / 255
224
225
226
227 Each of the mlib_GraphicsDrawPolygon_G_*() functions draws a polygon
228 with Gouraud shading.
229
230
231 Each of the mlib_GraphicsDrawPolygon_Z_*() functions draws a polygon
232 with Z buffering.
233
234
235 Each of the other functions draws a polygon with a combination of two
236 or more features like antialiasing (A), alpha blending (B), Gouraud
237 shading (G), and Z buffering (Z).
238
240 Each of the functions takes some of the following arguments:
241
242 buffer Pointer to the image into which the function is drawing.
243
244
245 zbuffer Pointer to the image that holds the Z buffer.
246
247
248 x Pointer to the array of X coordinates of the vertices.
249
250
251 y Pointer to the array of Y coordinates of the vertices.
252
253
254 z Pointer to the array of Z coordinates of the vertices.
255
256
257 npoints Number of vertices in the arrays.
258
259
260 c Color used in the drawing, or pointer to array of colors of
261 the points in the case of Gouraud shading.
262
263
264 c2 Alternation color.
265
266
267 a Alpha value for blending. 0 ≤ a ≤ 255.
268
269
271 Each of the functions returns MLIB_SUCCESS if successful. Otherwise it
272 returns MLIB_FAILURE.
273
275 See attributes(5) for descriptions of the following attributes:
276
277
278
279
280 ┌─────────────────────────────┬─────────────────────────────┐
281 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
282 ├─────────────────────────────┼─────────────────────────────┤
283 │Interface Stability │Committed │
284 ├─────────────────────────────┼─────────────────────────────┤
285 │MT-Level │MT-Safe │
286 └─────────────────────────────┴─────────────────────────────┘
287
289 mlib_GraphicsFillPolygon(3MLIB), attributes(5)
290
291
292
293SunOS 5.11 2 Mar 2007 mlib_GraphicsDrawPolygon(3MLIB)