Lines Matching refs:rects
47 // 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
48 // 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
88 STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
90 // 'stbrp_rect' defined below, stored in the array 'rects', and there
99 // You should not try to access the 'rects' array from another thread
549 STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
555 rects[i].was_packed = i;
559 STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
562 if (rects[i].w == 0 || rects[i].h == 0) {
563 rects[i].x = rects[i].y = 0; // empty rect needs no space
565 stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
567 rects[i].x = (stbrp_coord) fr.x;
568 rects[i].y = (stbrp_coord) fr.y;
570 rects[i].x = rects[i].y = STBRP__MAXVAL;
576 STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
580 rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
581 if (!rects[i].was_packed)