1TICKIT_RECT_ADD(3) Library Functions Manual TICKIT_RECT_ADD(3)
2
3
4
6 tickit_rect_add - obtain the union sum of two rectangles
7
9 #include <tickit.h>
10
11 int tickit_rect_add(TickitRect dst[3],
12 const TickitRect *a, const TickitRect *b);
13
14 Link with -ltickit.
15
17 tickit_rect_add() initialises the rectangle structures given by dst
18 (which must be an array capable of containing at least three rectangle
19 structures) with a set of non-overlapping rectangles covering the same
20 area as the two given by a and b. Depending on the geometry of the
21 given rectangles it may create one, two, or three resultant rectangles.
22 It returns the number of rectangular regions initialised into the
23 result array.
24
25 If the original rectangles do not touch then the result will contain
26 just those two. If they touch then the result will contain the one to
27 three non-overlapping horizontal stripes that cover the same area, in
28 order of increasing line number.
29
31 tickit_rect_add() returns the number of rectangles written to dst.
32
34 tickit_rect_init_sized(3), tickit_rect_init_bounded(3),
35 tickit_rect_intersect(3), tickit_rect_subtract(3), tickit_rect(7),
36 tickit(7)
37
38
39
40 TICKIT_RECT_ADD(3)