1mlib_GraphicsFillTriangleSemte(d3iMaLLIiBb)Library Fmulnicbt_iGornasphicsFillTriangleSet(3MLIB)
2
3
4

NAME

6       mlib_GraphicsFillTriangleSet,           mlib_GraphicsFillTriangleSet_8,
7       mlib_GraphicsFillTriangleSet_32,      mlib_GraphicsFillTriangleSet_X_8,
8       mlib_GraphicsFillTriangleSet_X_32,    mlib_GraphicsFillTriangleSet_A_8,
9       mlib_GraphicsFillTriangleSet_A_32,    mlib_GraphicsFillTriangleSet_B_8,
10       mlib_GraphicsFillTriangleSet_B_32,    mlib_GraphicsFillTriangleSet_G_8,
11       mlib_GraphicsFillTriangleSet_G_32,    mlib_GraphicsFillTriangleSet_Z_8,
12       mlib_GraphicsFillTriangleSet_Z_32,   mlib_GraphicsFillTriangleSet_AB_8,
13       mlib_GraphicsFillTriangleSet_AB_32, mlib_GraphicsFillTriangleSet_ABG_8,
14       mlib_GraphicsFillTriangleSet_ABG_32,         mlib_GraphicsFillTriangle‐
15       Set_ABGZ_8, mlib_GraphicsFillTriangleSet_ABGZ_32, mlib_GraphicsFillTri‐
16       angleSet_ABZ_8, mlib_GraphicsFillTriangleSet_ABZ_32, mlib_GraphicsFill‐
17       TriangleSet_AG_8,  mlib_GraphicsFillTriangleSet_AG_32,   mlib_Graphics‐
18       FillTriangleSet_AGZ_8, mlib_GraphicsFillTriangleSet_AGZ_32, mlib_Graph‐
19       icsFillTriangleSet_AZ_8,            mlib_GraphicsFillTriangleSet_AZ_32,
20       mlib_GraphicsFillTriangleSet_BG_8,  mlib_GraphicsFillTriangleSet_BG_32,
21       mlib_GraphicsFillTriangleSet_BGZ_8,          mlib_GraphicsFillTriangle‐
22       Set_BGZ_32,  mlib_GraphicsFillTriangleSet_BZ_8, mlib_GraphicsFillTrian‐
23       gleSet_BZ_32, mlib_GraphicsFillTriangleSet_GZ_8,  mlib_GraphicsFillTri‐
24       angleSet_GZ_32  -  draw  filled triangle set where each member can have
25       different vertices
26

SYNOPSIS

28       cc [ flag... ] file... -lmlib [ library... ]
29       #include <mlib.h>
30
31       mlib_status mlib_GraphicsFillTriangleSet_8(mlib_image *buffer,
32            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
33
34
35       mlib_status mlib_GraphicsFillTriangleSet_32(mlib_image *buffer,
36            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
37
38
39       mlib_status mlib_GraphicsFillTriangleSet_X_8(mlib_image *buffer,
40            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
41            mlib_s32 c2);
42
43
44       mlib_status mlib_GraphicsFillTriangleSet_X_32(mlib_image *buffer,
45            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
46            mlib_s32 c2);
47
48
49       mlib_status mlib_GraphicsFillTriangleSet_A_8(mlib_image *buffer,
50            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
51
52
53       mlib_status mlib_GraphicsFillTriangleSet_A_32(mlib_image *buffer,
54            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
55
56
57       mlib_status mlib_GraphicsFillTriangleSet_B_8(mlib_image *buffer,
58            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
59            mlib_s32 a);
60
61
62       mlib_status mlib_GraphicsFillTriangleSet_B_32(mlib_image *buffer,
63            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
64            mlib_s32 a);
65
66
67       mlib_status mlib_GraphicsFillTriangleSet_G_8(mlib_image *buffer,
68            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
69            const mlib_s32 *c);
70
71
72       mlib_status mlib_GraphicsFillTriangleSet_G_32(mlib_image *buffer,
73            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
74            const mlib_s32 *c);
75
76
77       mlib_status mlib_GraphicsFillTriangleSet_Z_8(mlib_image *buffer,
78            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
79            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
80
81
82       mlib_status mlib_GraphicsFillTriangleSet_Z_32(mlib_image *buffer,
83            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
84            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
85
86
87       mlib_status mlib_GraphicsFillTriangleSet_AB_8(mlib_image *buffer,
88            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
89            mlib_s32 a);
90
91
92       mlib_status mlib_GraphicsFillTriangleSet_AB_32(mlib_image *buffer,
93            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
94            mlib_s32 a);
95
96
97       mlib_status mlib_GraphicsFillTriangleSet_ABG_8(mlib_image *buffer,
98            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
99            const mlib_s32 *c, mlib_s32 a);
100
101
102       mlib_status mlib_GraphicsFillTriangleSet_ABG_32(mlib_image *buffer,
103            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
104            const mlib_s32 *c, mlib_s32 a);
105
106
107       mlib_status mlib_GraphicsFillTriangleSet_ABGZ_8(mlib_image *buffer,
108            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
109            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
110
111
112       mlib_status mlib_GraphicsFillTriangleSet_ABGZ_32(mlib_image *buffer,
113            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
114            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
115
116
117       mlib_status mlib_GraphicsFillTriangleSet_ABZ_8(mlib_image *buffer,
118            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
119            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
120
121
122       mlib_status mlib_GraphicsFillTriangleSet_ABZ_32(mlib_image *buffer,
123            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
124            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
125
126
127       mlib_status mlib_GraphicsFillTriangleSet_AG_8(mlib_image *buffer,
128            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
129            const mlib_s32 *c);
130
131
132       mlib_status mlib_GraphicsFillTriangleSet_AG_32(mlib_image *buffer,
133            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
134            const mlib_s32 *c);
135
136
137       mlib_status mlib_GraphicsFillTriangleSet_AGZ_8(mlib_image *buffer,
138            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
139            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
140
141
142       mlib_status mlib_GraphicsFillTriangleSet_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_GraphicsFillTriangleSet_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, mlib_s32 c);
150
151
152       mlib_status mlib_GraphicsFillTriangleSet_AZ_32(mlib_image *buffer,
153            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
154            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
155
156
157       mlib_status mlib_GraphicsFillTriangleSet_BG_8(mlib_image *buffer,
158            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
159            const mlib_s32 *c, mlib_s32 a);
160
161
162       mlib_status mlib_GraphicsFillTriangleSet_BG_32(mlib_image *buffer,
163            const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
164            const mlib_s32 *c, mlib_s32 a);
165
166
167       mlib_status mlib_GraphicsFillTriangleSet_BGZ_8(mlib_image *buffer,
168            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
169            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
170
171
172       mlib_status mlib_GraphicsFillTriangleSet_BGZ_32(mlib_image *buffer,
173            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
174            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
175
176
177       mlib_status mlib_GraphicsFillTriangleSet_BZ_8(mlib_image *buffer,
178            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
179            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
180
181
182       mlib_status mlib_GraphicsFillTriangleSet_BZ_32(mlib_image *buffer,
183            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
184            const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
185
186
187       mlib_status mlib_GraphicsFillTriangleSet_GZ_8(mlib_image *buffer,
188            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
189            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
190
191
192       mlib_status mlib_GraphicsFillTriangleSet_GZ_32(mlib_image *buffer,
193            mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
194            const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
195
196

DESCRIPTION

198       Each of the mlib_GraphicsFillTriangleSet_*() functions draws a  set  of
199       filled   triangles   with  vertices  at  {(x1,y1),  (x2,y2),  (x3,y3)},
200       {(x4,y4),  (x5,y5),  (x6,y6)},  ...,  and  {(xn-2,yn-2),   (xn-1,yn-1),
201       (xn,yn)}.
202
203
204       Each of the mlib_GraphicsFillTriangleSet_X_*() functions draws a set of
205       filled triangles in Xor mode as follows:
206
207             data[x,y] ^= c ^ c2
208
209
210
211       Each of the mlib_GraphicsFillTriangleSet_A_*() functions draws a set of
212       filled triangles with antialiasing.
213
214
215       Each of the mlib_GraphicsFillTriangleSet_B_*() functions draws a set of
216       filled triangles with alpha blending as follows:
217
218             data[x,y] = (data[x,y] * (255 - a) + c * a) / 255
219
220
221
222       Each of the mlib_GraphicsFillTriangleSet_G_*() functions draws a set of
223       filled triangles with Gouraud shading.
224
225
226       Each of the mlib_GraphicsFillTriangleSet_Z_*() functions draws a set of
227       filled triangles with Z buffering.
228
229
230       Each of the other functions draws a set of filled triangles with a com‐
231       bination  of two or more features like antialiasing (A), alpha blending
232       (B), Gouraud shading (G), and Z buffering (Z).
233

PARAMETERS

235       Each of the functions takes some of the following arguments:
236
237       buffer     Pointer to the image into which the function is drawing.
238
239
240       zbuffer    Pointer to the image that holds the Z buffer.
241
242
243       x          Pointer to array of X coordinates of the points.
244
245
246       y          Pointer to array of Y coordinates of the points.
247
248
249       z          Pointer to array of Z coordinates of the points.
250
251
252       npoints    Number of points in the arrays. npoints must be  a  multiple
253                  of 3.
254
255
256       c          Color  used in the drawing, or pointer to array of colors of
257                  the points in the case of Gouraud shading.
258
259
260       c2         Alternation color.
261
262
263       a          Alpha value for blending. 0 ≤ a ≤ 255.
264
265

RETURN VALUES

267       Each of the functions returns MLIB_SUCCESS if successful. Otherwise  it
268       returns MLIB_FAILURE.
269

ATTRIBUTES

271       See attributes(5) for descriptions of the following attributes:
272
273
274
275
276       ┌─────────────────────────────┬─────────────────────────────┐
277       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
278       ├─────────────────────────────┼─────────────────────────────┤
279       │Interface Stability          │Committed                    │
280       ├─────────────────────────────┼─────────────────────────────┤
281       │MT-Level                     │MT-Safe                      │
282       └─────────────────────────────┴─────────────────────────────┘
283

SEE ALSO

285       mlib_GraphicsFillTriangle(3MLIB),            mlib_GraphicsFillTriangle‐
286       FanSet(3MLIB), mlib_GraphicsFillTriangleStripSet(3MLIB), attributes(5)
287
288
289
290SunOS 5.11                        2 Mar 2007mlib_GraphicsFillTriangleSet(3MLIB)
Impressum