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

NAME

6       dtk_create_triangle - Create and modify triangle shape
7

SYNOPSIS

9       #include <drawtk.h>
10
11       dtk_hshape dtk_create_triangle(dtk_hshape shp,
12                       float x1, float y1,
13                       float x2, float y2,
14                       float x3, float y3,
15                       int filled, const float *color);
16

DESCRIPTION

18       dtk_create_triangle()  creates a triangle between the vertices (x1,y1),
19       (x2,y2) and (x3,y3).
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

RETURN VALUE

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

SEE ALSO

43       dtk_destroy_shape(3)
44
45
46
47
48
49EPFL                                 2011               DTK_CREATE_TRIANGLE(3)
Impressum