Open dkrautha opened 3 years ago
Given that StyledMultiShape2D::render
just grabs the line width from the Style
and uses it once, we should be able to just make line width a class variable. The biggest side effect of this will be that changing the line width will redraw the entire multishape to that new line width, but I think that was already how StyledMultiShape2D
worked. We can implement this as a private class variable. I'd suggest not making it constant, as this would prevent us from changing the thickness of lines after the initial creation, and instead use a setter to change the line width and check that it is within acceptable bounds for a line width.
However, this will likely require rewriting a large chunk of anything that currently uses a style to set line width. This will probably include most of the tests
Note: fixing this would allow us to fix and close #10
Need to investigate the following:
As of now styled multi shapes are forced on taking a Style, but the only thing they use from it is the line width. Besides that one number, a styled multi shape is capable of putting color on anything it draws. A line width should be a variable internal to styled multi shapes, and potentially be something that could be changed after creation depending on how SMS actually uses the line width it got from the style.