libtonc
Rect functions

Data Structures

struct  RECT
 Rectangle struct. More...
 

Typedefs

typedef struct RECT RECT
 Rectangle struct.
 
typedef struct RECT RECT32
 

Functions

INLINE RECTrc_set (RECT *rc, int l, int t, int r, int b)
 Initialize a rectangle.
 
INLINE RECTrc_set2 (RECT *rc, int x, int y, int w, int h)
 Initialize a rectangle, with sizes inside of max boundaries.
 
INLINE int rc_width (const RECT *rc)
 Get rectangle width.
 
INLINE int rc_height (const RECT *rc)
 Get rectangle height.
 
INLINE RECTrc_set_pos (RECT *rc, int x, int y)
 Move rectangle to (x, y) position.
 
INLINE RECTrc_set_size (RECT *rc, int w, int h)
 Reside rectangle.
 
INLINE RECTrc_move (RECT *rc, int dx, int dy)
 Move rectangle by (dx, dy).
 
INLINE RECTrc_inflate (RECT *rc, int dw, int dh)
 Increase size by dw horizontally and dh vertically.
 
INLINE RECTrc_inflate2 (RECT *rc, const RECT *dr)
 Increase sizes on all sides by values of rectangle dr.
 
RECTrc_normalize (RECT *rc)
 

Detailed Description

Function Documentation

◆ rc_set()

INLINE RECT * rc_set ( RECT rc,
int  l,
int  t,
int  r,
int  b 
)

Initialize a rectangle.

Parameters
lLeft side.
tTop side.
rRight side.
bBottom side.

◆ rc_set2()

INLINE RECT * rc_set2 ( RECT rc,
int  x,
int  y,
int  w,
int  h 
)

Initialize a rectangle, with sizes inside of max boundaries.

Parameters
xLeft side.
yTop side.
wWidth.
hHeight.