resvg
resvg copied to clipboard
usvg --preserve-markers feature request
Feature request for usvg
--preserve-markers Do not convert markers into paths.
Currently, it's impossible to implement. It might become available in the future, but no timeline.
Out of curiosity, what features would you exactly expect from this? Simply that there is a way to distinguish between paths and markers, or would you also like to be able to access the properties of a marker, or something else?
@LaurenzV This kinda relates to #701
While we can trick usvg::Tree
to have proper bboxes, it would not work when writing back to SVG. Meaning that ideally markers should not be flattened, sadly.
We still can add helper functions to simplify markers drawing.
Yeah, I was thinking we can simply introduce a new marker node, and similarly to text we can just have a flattened
property that contains the flattened version of it. But I guess we will also have to keep track of the other attributes. I haven't really looked into how marker's work though, so I can't judge what is necessary.