Open LondonClass opened 9 months ago
Text and image are already pretty separate right now so I expect this could be refactored reasonably easily. Text happens mostly in it's own submodule and gets drawn on top at the end.
You could probably define a new DrawableShape that was a combination of any underlying shapes you want, the base shape drawing part isn't that tough and follows a pretty similar process for circles, rectangles and rounded rectangles. IIRC there are a few optimisations here and there depending on the base shape, but if you wanted triangular shapes or star shapes it should all be doable, maybe a basic filled polygon shape is the way to go to cover lots of bases?
The drawable shape combination can bind a set of drawable shapes together and operate like a separate drawable shape. This way, complex shapes can be achieved by combining drawable_shape.
Actually, it may be a good idea to divide the text and image parts of drawable_shape into two parts.