summaryrefslogtreecommitdiff
path: root/wasp/boards/simulator/test_unit.py
AgeCommit message (Collapse)Author
2021-07-22draw565: Improve line wrappingDaniel Thompson
Currently the final word of wrapped text will always appear as a single word on its own line. Fix this by rearranging the break cases to avoid searching for the most recent space when we get to the end of the text. Fixes: #230 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-04draw565: Fix bounding box calculationsDaniel Thompson
wasp-os uses an drawing optimization technique to automatically place a single pixel line on the right of glyphs when rendering them. This results in a change to the bounding box for a rendered string (by adding a single pixel on the right of the final character). Fix the bounding box calculations accordingly. Among other things this eliminates graphical artifacts when rendering labels in 2048. Fixes: #203 Fixes: 58b5c0378ec3 ("draw565: Optimize the string drawing") Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-06simulator: test: Add Draw565.bounding_box unit testsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29draw565: Add lighten/darken functionsDaniel Thompson
Add functions to generate shades from a single (usually theme provided) basic palette colour. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>