Logo background
MohammadRezaei92 opened this issue · 2 comments
MohammadRezaei92 commented
Please add logo background option
alexzhirkevich commented
Logo is a painter. You can add background to your image or wrap logo painter in other painter
class WrapperPainter(
private val painter: Painter,
private val background : Color,
) : Painter() {
override val intrinsicSize: Size
get() = painter.intrinsicSize
override fun DrawScope.onDraw() {
drawRect(background)
painter.run {
draw(size)
}
}
}
MohammadRezaei92 commented
Logo is a painter. You can add background to your image or wrap logo painter in other painter
class WrapperPainter( private val painter: Painter, private val background : Color, ) : Painter() { override val intrinsicSize: Size get() = painter.intrinsicSize override fun DrawScope.onDraw() { drawRect(background) painter.run { draw(size) } } }
This solution just add the background to logo painter. If we have some paddings for logo, the background is different there.