Closed Sophist-UK closed 3 years ago
I believe this is ready for merging subject to review.
SVG_ATTR_PATTERN_CONTENT_UNITS = "patternContentUnits"
self.pattern_content_units = values[SVG_ATTR_PATTERN_CONTENT_UNITS]
SVG_ATTR_CLIP_UNIT_TYPE = "clipPathUnits"
self.unit_type = SVG_UNIT_TYPE_USERSPACEONUSE
Apologies for breaking backward compatibility. Hopefully this is now OK.
Ok - hopefully this should be backwards compatible and addresses all concerns (which have also had unit tests added for).
I thought that conformance to svg was more important.
It could potentially have been backwards incompatible, but:
Now you have brought my attention to there being other examples, I will put making similar "fixes" on my to-do list. 😉 But before you get too worried, getting to the top of the list seems unlikely.
stroke-width is not handled properly.
some attribute name are hard-coded in repr rather than referring to the attribute contant.
but this is low priority so not aiming to address either of these any time soon.
init
now handles various forms of arguments so it can recreate from a repr:repr
.preserve_aspect_ratio
as an attribute when the SVG attribute ispreserveAspectRatio
. Backwards compatibility is preserved.