1DTK_CREATE_CROSS(3) Draw Toolkit manual DTK_CREATE_CROSS(3)
2
3
4
6 dtk_create_cross - Create and modify cross shape
7
9 #include <drawtk.h>
10
11 dtk_hshape dtk_create_cross(dtk_hshape shp,
12 float cx, float cy, float width, const float *color);
13
15 dtk_create_cross() creates a cross whose centered is located at (cx,cy)
16 with a length of width.
17
18 shp and color have the same usage and meaning as for other shape cre‐
19 ation function:
20
21 * shp can be used to modify a previously created shape. If it is non-
22 null, the handle will be used to modify the shape referenced by shp:
23 no new shape is created and the returned value is ensured to be shp
24 in case of success, NULL otherwise. If shp is NULL, the function
25 will attempt to create a new shape.
26
27 * color should point to a 4 float array containing a normalized RGBA
28 value (i.e. each component is between 0.0 and 1.0).
29
31 In case of success these functions return the handle to the newly cre‐
32 ated or modified shape. If the shp argument is non-null, the handle
33 returned is the same value. In case of error, NULL is returned.
34
36 dtk_destroy_shape(3)
37
38
39
40
41
42EPFL 2011 DTK_CREATE_CROSS(3)