Skip to content

Feature request: Paths returned by svg2paths inherit attributes from parent group(s) #242

@bretttolbert

Description

@bretttolbert

Consider an SVG file like the following:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" 
width="100%" height="100%" viewBox="0 0 1440 720">
<g fill="#034da2">
  <rect width="1440" height="120" id="Upper blue field"/>
  <rect width="1440" height="120" y="600" id="Lower blue field"/>
</g>

Currently, if we get the paths and attributes like this...

paths, attributes = svg2paths(filepath)

...then the fill attribute on the group (<g> element) is not included. Is there any way to get it? Would it be possible to make the returned paths inherit attributes from the parent group(s)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions