Lines Matching refs:RAreaList

19 static RAreaList *RAreaListCopy(const RAreaList *self);
20 static void RAreaListDelete(RAreaList *self, int index);
21 static void RAreaListAddList(RAreaList *self, const RAreaList *other);
22 static RAreaList *RAreaListIntersectCrop(const RAreaList *self,
27 static void RAreaListSortX(const RAreaList *self);
29 static void RAreaListSortY(const RAreaList *self);
34 * Create an RAreaList from a set of RArea's.
39 RAreaList *
43 RAreaList *list;
46 list = malloc(sizeof(RAreaList));
74 * Create a copy of a given RAreaList.
76 static RAreaList *
77 RAreaListCopy(const RAreaList *self)
79 RAreaList *new = RAreaListNew(self->cap, NULL);
88 * Create a copy of an RAreaList with given amounts cropped off the
92 RAreaList *
93 RAreaListCopyCropped(const RAreaList *self, int left_margin,
122 // If we cropped down to nothing, that's a RAreaList with nothing
128 // Make a new RAreaList cropped down to that size.
138 * Clean up and free an RAreaList.
141 RAreaListFree(RAreaList *self)
152 * Delete an RArea from inside an RAreaList.
155 RAreaListDelete(RAreaList *self, int index)
173 * Add an RArea onto an RAreaList.
176 RAreaListAdd(RAreaList *self, const RArea *area)
193 * Add the RArea's from one RAreaList onto another.
196 RAreaListAddList(RAreaList *self, const RAreaList *other)
236 * Sort the RArea's in an RAreaList by their x coordinate.
239 RAreaListSortX(const RAreaList *self)
270 * Sort the RArea's in an RAreaList by their y coordinate.
273 RAreaListSortY(const RAreaList *self)
284 * Create an RAreaList whose RArea's are the horizontal union of our
287 RAreaList *
288 RAreaListHorizontalUnion(const RAreaList *self)
290 RAreaList *copy = RAreaListCopy(self);
303 RAreaList *repl = RAreaHorizontalUnion(&copy->areas[i], &copy->areas[j]);
322 * Create an RAreaList whose RArea's are the vertical union of our
325 RAreaList *
326 RAreaListVerticalUnion(const RAreaList *self)
328 RAreaList *copy = RAreaListCopy(self);
336 RAreaList *repl = RAreaVerticalUnion(&copy->areas[i], &copy->areas[j]);
355 * Create an RAreaList of all the areas in an RAreaList that a given
358 RAreaList *
359 RAreaListIntersect(const RAreaList *self, const RArea *area)
361 RAreaList *new = RAreaListNew(self->len, NULL);
374 * Run a function over each RArea in an RAreaList until one returns true,
378 RAreaListForeach(const RAreaList *self,
392 * Create an RAreaList from another, cropped to a certain area defined by
395 static RAreaList *
396 RAreaListIntersectCrop(const RAreaList *self, const RArea *area)
398 RAreaList *new = RAreaListNew(self->len, NULL);
412 * Create a maximal RArea describing the union of an RAreaList.
421 RAreaListBigArea(const RAreaList *self)
454 * Find the RArea in an RAreaList that has the largest intersection with
455 * a given RArea. Colloquially, which area in an RAreaList does our
460 RAreaListBestTarget(const RAreaList *self, const RArea *area)
478 * Find the x coordinate of the right-most RArea in an RAreaList.
481 RAreaListMaxX(const RAreaList *self)
500 * Find the y coordinate of the bottom-most RArea in an RAreaList.
503 RAreaListMaxY(const RAreaList *self)
520 * RAreaList.
523 RAreaListMinX2(const RAreaList *self)
540 * RAreaList.
543 RAreaListMinY2(const RAreaList *self)
559 * Pretty-print an RAreaList.
564 RAreaListPrint(const RAreaList *self)