21 RArea area = {
x,
y, width, height };
51 RArea area = { -1, -1, -1, -1 };
255 if(
bot->y != top->
y) {
355 const RArea *left, *right;
369 if(right->
x != left->
x) {
RArea RAreaInvalid(void)
Return a facially-invalid RArea.
RArea RAreaNew(int x, int y, int width, int height)
Construct an RArea from given components.
RArea RAreaIntersect(const RArea *self, const RArea *other)
Return an RArea describing the intersection of two RArea's.
int RAreaArea(const RArea *self)
Return the area of an RArea.
RAreaList * RAreaHorizontalUnion(const RArea *self, const RArea *other)
Create a list of maximal horizontal stripes of two RArea's.
bool RAreaIsIntersect(const RArea *self, const RArea *other)
Do two areas intersect?
RArea * RAreaNewStatic(int x, int y, int width, int height)
Return a pointer to a static newly constructed RArea.
bool RAreaIsValid(const RArea *self)
Is an RArea facially valid?
void RAreaPrint(const RArea *self)
Pretty-print an RArea.
int RAreaY2(const RArea *self)
Return the bottom edge of an RArea.
int RAreaX2(const RArea *self)
Return the right edge of an RArea.
RAreaList * RAreaVerticalUnion(const RArea *self, const RArea *other)
Create a list of maximal vertical stripes of two RArea's.
bool RAreaContainsXY(const RArea *self, int x, int y)
Is a given coordinate inside a RArea?
RAreaList * RAreaListNew(int cap,...)
Create an RAreaList from a set of RArea's.
void RAreaListAdd(RAreaList *self, const RArea *area)
Add an RArea onto an RAreaList.
A particular extent of space.
static int min(int a, int b)
static int max(int a, int b)