41 return box.
w == 0 || box.
h == 0;
146#define GP_BBOX_FMT "[%i, %i] w=%u h=%u"
148#define GP_BBOX_PARS(bbox) (bbox).x, (bbox).y, (bbox).w, (bbox).h
#define GP_MAX(a, b)
Returns a maximum of the two numbers.
#define GP_MIN(a, b)
Returns a minimum of the two numbers.
int gp_coord
Integer type for coordinates i.e. x, y, ...
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
static gp_bbox gp_bbox_intersection(gp_bbox box1, gp_bbox box2)
Calculates a bounding box intersection.
static gp_bbox gp_bbox_move(gp_bbox box, gp_coord x, gp_coord y)
Moves bounding box.
static gp_bbox gp_bbox_merge(gp_bbox box1, gp_bbox box2)
Merges two bounding boxes.
static int gp_bbox_empty(gp_bbox box)
Returns true if bounding box is empty.
static gp_bbox gp_bbox_pack(gp_coord x, gp_coord y, gp_coord w, gp_coord h)
Creates a bounding box from coordinates and size.
static int gp_bbox_intersects(gp_bbox box1, gp_bbox box2)
Returns true if bouding boxes intersects.
gp_coord x
A left bbox corner coordinate.
gp_coord y
A top bbox corner coordinate.