1mlib_GraphicsDrawArc(3MLIB)mediaLib Library Functionsmlib_GraphicsDrawArc(3MLIB)
2
3
4

NAME

6       mlib_GraphicsDrawArc,  mlib_GraphicsDrawArc_8, mlib_GraphicsDrawArc_32,
7       mlib_GraphicsDrawArc_X_8,   mlib_GraphicsDrawArc_X_32,   mlib_Graphics‐
8       DrawArc_A_8,    mlib_GraphicsDrawArc_A_32,    mlib_GraphicsDrawArc_B_8,
9       mlib_GraphicsDrawArc_B_32,  mlib_GraphicsDrawArc_AB_8,   mlib_Graphics‐
10       DrawArc_AB_32 - draw arc
11

SYNOPSIS

13       cc [ flag... ] file... -lmlib [ library... ]
14       #include <mlib.h>
15
16       mlib_status mlib_GraphicsDrawArc_8(mlib_image *buffer, mlib_s16 x,
17            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c);
18
19
20       mlib_status mlib_GraphicsDrawArc_32(mlib_image *buffer, mlib_s16 x,
21            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c);
22
23
24       mlib_status mlib_GraphicsDrawArc_X_8(mlib_image *buffer, mlib_s16 x,
25            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
26            mlib_s32 c2);
27
28
29       mlib_status mlib_GraphicsDrawArc_X_32(mlib_image *buffer, mlib_s16 x,
30            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
31            mlib_s32 c2);
32
33
34       mlib_status mlib_GraphicsDrawArc_A_8(mlib_image *buffer, mlib_s16 x,
35            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c);
36
37
38       mlib_status mlib_GraphicsDrawArc_A_32(mlib_image *buffer, mlib_s16 x,
39            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c);
40
41
42       mlib_status mlib_GraphicsDrawArc_B_8(mlib_image *buffer, mlib_s16 x,
43            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
44            mlib_s32 a);
45
46
47       mlib_status mlib_GraphicsDrawArc_B_32(mlib_image *buffer, mlib_s16 x,
48            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
49            mlib_s32 a);
50
51
52       mlib_status mlib_GraphicsDrawArc_AB_8(mlib_image *buffer, mlib_s16 x,
53            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
54            mlib_s32 a);
55
56
57       mlib_status mlib_GraphicsDrawArc_AB_32(mlib_image *buffer, mlib_s16 x,
58            mlib_s16 y, mlib_s32 r, mlib_f32 t1, mlib_f32 t2, mlib_s32 c,
59            mlib_s32 a);
60
61

DESCRIPTION

63       Each  of  the  mlib_GraphicsDrawArc_*() functions draws an arc with the
64       center at (x, y), radius r, start angle t1, and end angle t2.
65
66
67       Each of the mlib_GraphicsDrawArc_X_*() functions draws an  arc  in  Xor
68       mode as follows:
69
70             data[x,y] ^= c ^ c2
71
72
73
74       Each  of  the  mlib_GraphicsDrawArc_A_*()  functions  draws an arc with
75       antialiasing.
76
77
78       Each of the mlib_GraphicsDrawArc_B_*()  functions  draws  an  arc  with
79       alpha blending as follows:
80
81             data[x,y] = (data[x,y] * (255 - a) + c * a) / 255
82
83
84
85       Each  of  the  mlib_GraphicsDrawArc_AB_*()  functions draws an arc with
86       antialiasing and alpha blending.
87

PARAMETERS

89       Each of the functions takes some of the following arguments:
90
91       buffer    Pointer to the image into which the function is drawing.
92
93
94       x         X coordinate of the center.
95
96
97       y         Y coordinate of the center.
98
99
100       r         Radius of the arc.
101
102
103       t1        Start angle of the arc in radians.
104
105
106       t2        End angle of the arc in radians.
107
108
109       c         Color used in the drawing.
110
111
112       c2        Alternation color.
113
114
115       a         Alpha value for blending. 0 ≤ a ≤ 255.
116
117

RETURN VALUES

119       Each of the functions returns MLIB_SUCCESS if successful. Otherwise  it
120       returns MLIB_FAILURE.
121

ATTRIBUTES

123       See attributes(5) for descriptions of the following attributes:
124
125
126
127
128       ┌─────────────────────────────┬─────────────────────────────┐
129       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
130       ├─────────────────────────────┼─────────────────────────────┤
131       │Interface Stability          │Committed                    │
132       ├─────────────────────────────┼─────────────────────────────┤
133       │MT-Level                     │MT-Safe                      │
134       └─────────────────────────────┴─────────────────────────────┘
135

SEE ALSO

137       mlib_GraphicsDrawCircle(3MLIB),        mlib_GraphicsDrawEllipse(3MLIB),
138       attributes(5)
139
140
141
142SunOS 5.11                        2 Mar 2007       mlib_GraphicsDrawArc(3MLIB)
Impressum