TICKIT_RECTSET_RECTS(3)

NAME
tickit_rectset_rects, tickit_rectset_get_rects - obtain the regions from a rectangle set

SYNOPSIS
    #include <tickit.h>

    size_t tickit_rectset_rects(const TickitRectSet *trs);
    size_t tickit_rectset_get_rect(const TickitRectSet *trs,
        size_t i, TickitRect *rect);
    size_t tickit_rectset_get_rects(const TickitRectSet *trs,
        TickitRect rects[], size_t n);

Link with -ltickit.

DESCRIPTION
tickit_rectset_rects() returns the number of rectangular regions stored by the rectangle set.

tickit_rectset_get_rect() copies the region representing the rectangle at index i into the variable pointed to by rect, and returns 1. If i is an invalid index for this set then 0 is returned instead.

tickit_rectset_get_rects() copies at most n regions into the array given by rects, and returns the number of regions it copied (which may be fewer than the total stored, if the array was of insufficient size).

RETURN VALUE
tickit_rectset_rects() returns an integer giving the number of stored regions. tickit_rectset_get_rect() and tickit_rectset_get_rects() return the number of regions copied.

SEE ALSO
tickit_rectset_new(3), tickit_rectset(7), tickit(7)