1DTK_CREATE_CIRCLE(3)          Draw Toolkit manual         DTK_CREATE_CIRCLE(3)
2
3
4

NAME

6       dtk_create_circle - Create and modify circular shape
7

SYNOPSIS

9       #include <drawtk.h>
10
11       dtk_hshape dtk_create_circle(dtk_hshape shp,
12                       float cx, float cy, float r, int filled,
13                       const float *color, unsigned int numpoints);
14

DESCRIPTION

16       dtk_create_circle()  creates  an  approximation of a circle of radius r
17       centered at (cx,cy) using num_points vertices.
18
19       shp, filled and color have the same usage  and  meaning  as  for  other
20       shape creation function:
21
22        * shp  can be used to modify a previously created shape. If it is non-
23          null, the handle will be used to modify the shape referenced by shp:
24          no  new shape is created and the returned value is ensured to be shp
25          in case of success, NULL otherwise. If shp  is  NULL,  the  function
26          will attempt to create a new shape.
27
28        * filled  is  set  to  0 if the described shape should be a continuous
29          line or a non-null value if the shape is supposed to be filled poly‐
30          gon.
31
32        * color  should  point to a 4 float array containing a normalized RGBA
33          value (i.e. each component is between 0.0 and 1.0).
34

RETURN VALUE

36       In case of success these functions return the handle to the newly  cre‐
37       ated  or  modified  shape.  If the shp argument is non-null, the handle
38       returned is the same value. In case of error, NULL is returned.
39

SEE ALSO

41       dtk_destroy_shape(3)
42
43
44
45
46
47EPFL                                 2011                 DTK_CREATE_CIRCLE(3)
Impressum