Is there any way i can create a ‘WrapperPainter’, ...
# compose
m
Is there any way i can create a ‘WrapperPainter’, meaning, a painter that takes a painter, draw something behind and then draws the original painter. I have some repetitive vectores that the only difference is a circular background behind. I need to keep functionality so it must be a painter, otherwise i could just use .clip(CircleShape).background(Color.Black)
r
Could you separate the static and dynamic part and layer them on top of each other with a
Box
? Not sure if that'd be faster.
m
no i cant. I need a Painter solution
r
How come?
a
Isn't it as simple as delegating every function to the original painter?
m
no 😛 draw is protected
@reactormonk stop doubting my motives 😛 i don’t control the api. i need a painter. the alternative is repeating vectors
a
Okay I see. Maybe you can use the same way Coil is using.
👍 1
m
uuu. that actually helps thanks!!! i was looking for something that i believed to be this
i could do it converting the vector to bitmap but that defeats the point. I prefer vectors. less memory footprint