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

# tickit\_rect(7)

utility structure representing a rectangular region

## NAME

TickitRect - utility structure representing a rectangular region

## SYNOPSIS

```
#include <tickit.h>

typedef struct {
  int top;
  int left;
  int lines;
  int cols;
} TickitRect;
```

## DESCRIPTION

A **TickitRect** structure represents a single non-empty rectangular region of the screen. It stores the position of the top left corner of the region, and its size in lines and columns.

## FUNCTIONS

A new **TickitRect** structure can be initialised using the [**tickit\_rect\_init\_sized**(3)](/tickit_rect_init_sized/3.md) and [**tickit\_rect\_init\_bounded**(3)](/tickit_rect_init_bounded/3.md) functions. Its bottom right corner can be obtained using [**tickit\_rect\_bottom**(3)](/tickit_rect_bottom/3.md) and [**tickit\_rect\_right**(3)](/tickit_rect_right/3.md). Interactions between rectangles can be tested using the predicate functions [**tickit\_rect\_contains**(3)](/tickit_rect_contains/3.md) and [**tickit\_rect\_intersects**(3)](/tickit_rect_intersects/3.md). New rectangles can be created from existing ones using [**tickit\_rect\_intersect**(3)](/tickit_rect_intersect/3.md) to form the intersection, [**tickit\_rect\_add**(3)](/tickit_rect_add/3.md) to form the union sum, and [**tickit\_rect\_subtract**(3)](/tickit_rect_subtract/3.md).
