1DTK_SET_COLOR(3) Draw Toolkit manual DTK_SET_COLOR(3)
2
3
4
6 dtk_setcolor_shape - Set the color of a shape
7
9 #include <drawtk.h>
10
11 void dtk_setcolor_shape(const dtk_hshape shp, const float* color,
12 unsigned int mask);
13
15 dtk_setcolor_shape() set the color color of a shape identified by the
16 pointer shp. color should point to a 4 float array containing a normal‐
17 ized RGBA value (i.e. each component is between 0.0 and 1.0). If shp is
18 a composite shape, color is applied to all the shapes in the list.
19 Notice that color is applied uniformly to the whole shape. Bits in mask
20 correspond to the color channels that will NOT be set.
21
22 If mask is equal to 0 all the RGBA color channels will be set. Prede‐
23 fined values of mask:
24
25 * DTK_IGNR: ignore red color channel
26
27 * DTK_IGNG: ignore green color channel
28
29 * DTK_IGNB: ignore blue color channel
30
31 * DTK_IGNA: ignore alpha channel
32
33 * DTK_IGNRGB: ignore red, green and blue color channels
34
35
36
38 None.
39
41 dtk_create_shape(3), dtk_create_composite_shape(3)
42
43
44
45
46EPFL 2012 DTK_SET_COLOR(3)