1DTK_CREATE_COMPOSITE_SHAPE(3) Draw Toolkit manualDTK_CREATE_COMPOSITE_SHAPE(3)
2
3
4

NAME

6       dtk_create_composite_shape  -  Create  or  modify a shape holding other
7       shapes
8

SYNOPSIS

10       #include <drawtk.h>
11
12       dtk_hshape dtk_create_composite_shape(dtk_hshape shp,
13                                             unsigned int num,
14                                             const dtk_hshape *list,
15                                             int free_children);
16

DESCRIPTION

18       dtk_create_composite_shape() creates a  shape  made  of  num  different
19       shapes specified by the array list. When dtk_draw_shape(3) is called on
20       the composite shape, all referenced shapes  will  be  rendered  in  the
21       order  of  list.  The  composite shape create its own copy of the shape
22       list, so there is no need to keep the array pointed by  list  allocated
23       after the function returns.
24
25       If  free_children is a non-zero value, the destruction of the composite
26       shape will destroy the underlaying shapes. If  free_children  is  zero,
27       destroying  the  composite  shape  will  leave  the  referenced  shapes
28       untouched, so that dtk_destroy_shape() should be called for  all  indi‐
29       vidual shapes.
30
31       shp  can  be  used  to modify a previously created shape. If it is non-
32       null, the handle will be used to modify the shape referenced by shp: no
33       new  shape  is  created  and the returned value is ensured to be shp in
34       case of success, NULL otherwise. If shp  is  NULL,  the  function  will
35       attempt to create a new shape.
36

RETURN VALUE

38       In case of success the function returns the handle to the newly created
39       or modified shape. If the shp argument is non-null, the handle returned
40       is the same value. In case of error, NULL is returned.
41

SEE ALSO

43       dtk_destroy_shape(3), dtk_create_shape(3)
44
45
46
47
48
49EPFL                                 2010        DTK_CREATE_COMPOSITE_SHAPE(3)
Impressum