ref: e1fab0877ca6cb0632e5203d99591579d3b749ce
parent: e83fc0ac32af17baeae1a29e23de8c0decea7154
author: Philip Silva <philip.silva@protonmail.com>
date: Thu May 22 11:44:41 EDT 2025
box: add background property
--- a/box/box.go
+++ b/box/box.go
@@ -41,6 +41,8 @@
Height int
color.Colorset
+ Background *memdraw.Image
+
Margin space.Sp
Border space.Sp
Padding space.Sp
@@ -198,6 +200,9 @@
b.boxImg.Draw(r, b.Colorset.Normal.Background, image.ZP, color.EmptyMask, image.ZP, draw.SoverD)
} else {
memdraw.FillColor(b.boxImg, draw.Transparent)
+ }
+ if b.Background != nil {
+ b.boxImg.Draw(r, b.Background, image.ZP, color.EmptyMask, image.ZP, draw.SoverD)
}
}
}
--
⑨