1
0
Fork 0
Commit Graph

6 Commits (45b5332c3cc431538e5b451135f061ed7db6481b)

Author SHA1 Message Date
Ben Whittaker 202690de40 Layout: Implement text wrapping 2021-10-04 16:06:46 -04:00
Ben Whittaker 3622895f09 Layout: avoid floating point numbers
The previous approach involved calculating the width of each element
independently, and deriving the `x` coordinate of each element by
summing the previous widths. However, if the widths are rounded, summing
them leads to accumulated rounding errors.

This change effectively takes the alternate approach of calculating the
`x` coordinate of each element independently, and then deriving the
widths from the differences between adjacent values of `x`.

As a bonus, this change corrects a couple issues in the
`padding_with_fill` test.
2021-09-28 23:07:00 -04:00
Ben Whittaker 221c3acc94 Layout: make `pad` behave more consistently
Fixes the second test case in #819
2021-09-24 17:43:56 -04:00
Ben Whittaker 807ac743fc Layout: only set fillxy/y if null
Fixes #820
2021-09-23 22:32:06 -04:00
Gordon Williams 16fe84704b add test for accellog 2021-09-23 13:02:24 +01:00
Gordon Williams 0109a8114b Ensure padding works correctly (fix #819), also add Layout test harness basics 2021-09-23 12:47:12 +01:00