File: tickit_rect.7

package info (click to toggle)
libtickit 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,556 kB
  • sloc: ansic: 13,904; perl: 228; makefile: 161; sh: 38
file content (19 lines) | stat: -rw-r--r-- 1,076 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.TH TICKIT_RECT 7
.SH NAME
TickitRect \- utility structure representing a rectangular region
.SH SYNOPSIS
.EX
.B #include <tickit.h>
.sp
.BI "typedef struct {"
.BI "  int " top ;
.BI "  int " left ;
.BI "  int " lines ;
.BI "  int " cols ;
.BI "} " TickitRect ;
.EE
.sp
.SH DESCRIPTION
A \fBTickitRect\fP 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.
.SH FUNCTIONS
A new \fBTickitRect\fP structure can be initialised using the \fBtickit_rect_init_sized\fP(3) and \fBtickit_rect_init_bounded\fP(3) functions. Its bottom right corner can be obtained using \fBtickit_rect_bottom\fP(3) and \fBtickit_rect_right\fP(3). Interactions between rectangles can be tested using the predicate functions \fBtickit_rect_contains\fP(3) and \fBtickit_rect_intersects\fP(3). New rectangles can be created from existing ones using \fBtickit_rect_intersect\fP(3) to form the intersection, \fBtickit_rect_add\fP(3) to form the union sum, and \fBtickit_rect_subtract\fP(3).