24#include "rect-types.h"
55#define GUAC_RECT_MUTABLE_BUFFER(rect, buffer, stride, bpp) ((void*) ( \
56 ((unsigned char*) (buffer)) \
57 + guac_mem_ckd_mul_or_die((rect).top, stride) \
58 + guac_mem_ckd_mul_or_die((rect).left, bpp)))
89#define GUAC_RECT_CONST_BUFFER(rect, buffer, stride, bpp) ((const void*) ( \
90 ((const unsigned char*) (buffer)) \
91 + guac_mem_ckd_mul_or_die((rect).top, stride) \
92 + guac_mem_ckd_mul_or_die((rect).left, bpp)))
165void guac_rect_init(
guac_rect* rect,
int x,
int y,
int width,
int height);
180void guac_rect_align(
guac_rect* rect,
unsigned int bits);
221void guac_rect_shrink(
guac_rect* rect,
int max_width,
int max_height);
247int guac_rect_is_empty(
const guac_rect* rect);
258int guac_rect_width(
const guac_rect* rect);
269int guac_rect_height(
const guac_rect* rect);
Provides convenience macros/functions for performing arithmetic on size_t values and for allocating m...
A rectangle defined by its upper-left and lower-right corners.
Definition rect.h:94
int right
The X coordinate of the lower-right corner of this rectangle (exclusive).
Definition rect.h:130
int top
The Y coordinate of the upper-left corner of this rectangle (inclusive).
Definition rect.h:118
int left
The X coordinate of the upper-left corner of this rectangle (inclusive).
Definition rect.h:106
int bottom
The Y coordinate of the lower-right corner of this rectangle (exclusive).
Definition rect.h:142