resvg icon indicating copy to clipboard operation
resvg copied to clipboard

usvg --preserve-markers feature request

Open biojet1 opened this issue 1 year ago • 4 comments

Feature request for usvg --preserve-markers Do not convert markers into paths.

biojet1 avatar Feb 04 '24 01:02 biojet1

Currently, it's impossible to implement. It might become available in the future, but no timeline.

RazrFalcon avatar Feb 04 '24 12:02 RazrFalcon

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 avatar Mar 31 '24 08:03 LaurenzV

@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.

RazrFalcon avatar Mar 31 '24 10:03 RazrFalcon

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.

LaurenzV avatar Mar 31 '24 11:03 LaurenzV