1DTK_CREATE_ARROW(3) Draw Toolkit manual DTK_CREATE_ARROW(3)
2
3
4
6 dtk_create_arrow - Create and modify arrow shape
7
9 #include <drawtk.h>
10
11 dtk_hshape dtk_create_arrow(dtk_hshape shp,
12 float cx, float cy, float width, float height,
13 int filled, const float *color);
14
16 dtk_create_arrow() creates an arrow pointing to the left with the
17 pointed pointed located at (cx,cy) with a total width of width, a hat
18 of length width/3 , a total height of height and the width of the body
19 being height/2.
20
21 shp, filled and color have the same usage and meaning as for other
22 shape creation function:
23
24 * shp can be used to modify a previously created shape. If it is non-
25 null, the handle will be used to modify the shape referenced by shp:
26 no new shape is created and the returned value is ensured to be shp
27 in case of success, NULL otherwise. If shp is NULL, the function
28 will attempt to create a new shape.
29
30 * filled is set to 0 if the described shape should be a continuous
31 line or a non-null value if the shape is supposed to be filled poly‐
32 gon.
33
34 * color should point to a 4 float array containing a normalized RGBA
35 value (i.e. each component is between 0.0 and 1.0).
36
38 In case of success these functions return the handle to the newly cre‐
39 ated or modified shape. If the shp argument is non-null, the handle
40 returned is the same value. In case of error, NULL is returned.
41
43 dtk_destroy_shape(3)
44
45
46
47
48
49EPFL 2011 DTK_CREATE_ARROW(3)