---
name: "tickit_rectset"
section: "7"
platform: "linux"
package: "libtickit-dev"
version: "0.4.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tickit_rectset"
---

# tickit\_rectset(7)

store a collection of rectangular areas

## NAME

TickitRectSet - store a collection of rectangular areas

## SYNOPSIS

```
#include <tickit.h>

typedef struct TickitRectSet;
```

## DESCRIPTION

A **TickitRectSet** instance stores a collection of rectangular areas as non-overlapping regions. Mutation operations allow areas to be added or subtracted. Query operations allow testing for area containment, intersection, or iterating the stored regions.

## FUNCTIONS

A new **TickitRectSet** instance is created using the [**tickit\_rectset\_new**(3)](/tickit_rectset_new/3.md) function, and destroyed using [**tickit\_rectset\_destroy**(3)](/tickit_rectset_destroy/3.md).

Rectangular areas can be added using [**tickit\_rectset\_add**(3)](/tickit_rectset_add/3.md) and subtracted using [**tickit\_rectset\_subtract**(3)](/tickit_rectset_subtract/3.md). The **TickitRectSet** can be emptied of regions entirely by using [**tickit\_rectset\_clear**(3)](/tickit_rectset_clear/3.md). The entire set of regions can be uniformly moved using [**tickit\_rectset\_translate**(3)](/tickit_rectset_translate/3.md).

The stored regions can be queried by using [**tickit\_rectset\_rects**(3)](/tickit_rectset_rects/3.md) and [**tickit\_rectset\_get\_rects**(3)](/tickit_rectset_get_rects/3.md). An area can be tested to see if it is entirely contained in the set using [**tickit\_rectset\_contains**(3)](/tickit_rectset_contains/3.md), or that it intersects at all using [**tickit\_rectset\_intersects**(3)](/tickit_rectset_intersects/3.md).
