quakeforge/libs/ui
Bill Currie 28e9a0a9ba [ui] Add a specialized function for subrect allocation
While VRect_Difference worked for subrect allocation, it wasn't ideal as
it tended to produce a lot of long, narrow strips that were difficult to
reuse and thus wasted a lot of the super-rectangle's area. This is
because it always does horizontal splits first. However, rewriting
VRect_Difference didn't seem to be the best option.

VRect_SubRect (the new function) takes only width and height, and splits
the given rectangle such that if there are two off-cuts, they will be
both the minimum and maximum possible area. This does seem to make for
much better utilization of the available area. It's also faster as it
does only the two splits, rather than four.
2022-09-02 17:47:27 +09:00
..
test [ui] Move txtbuffer and vrect tests to libs/ui 2021-06-13 14:29:46 +09:00
inputline.c [ui] Create library for UI support code 2021-06-12 22:50:51 +09:00
Makemodule.am [build] Fix some make distcheck issues 2022-05-06 15:50:13 +09:00
txtbuffer.c [ui] Create library for UI support code 2021-06-12 22:50:51 +09:00
view.c [ui] Free the view's children array 2022-05-12 19:58:18 +09:00
vrect.c [ui] Add a specialized function for subrect allocation 2022-09-02 17:47:27 +09:00