This commit is contained in:
Ryan Oldenburg 2021-05-11 01:03:17 -05:00
parent eae3b5e443
commit f852d33ada
4 changed files with 18 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -689,3 +689,21 @@ block:
image.fillRect(rect, rgba(128, 128, 128, 128))
doDiff(image, "selection_rects2")
block:
var font = readFont("tests/fonts/Roboto-Regular_1.ttf")
font.size = 16
let image = newImage(75, 75)
image.fill(rgba(255, 255, 255, 255))
let arrangement = typeset(
font, "Wrapping text to new line", bounds = image.wh
)
image.fillText(arrangement)
for i, rect in arrangement.selectionRects:
image.fillRect(rect, rgba(128, 128, 128, 128))
doDiff(image, "selection_rects3")