Skip to content

Incorrect bounds if a path has 0 length #1156

Open
@Joyphish

Description

@Joyphish

Description

SvgElement provides incorrect bounds if one path has 0 length

Example data

The bounds for the group in the following SVG is incorrect. The path with 0 length should be ignored when it comes to bounds.

<svg xmlns="http://www.w3.org/2000/svg" width="1056" height="816" viewBox="0 0 792 612">
<clipPath id="a"><path transform="matrix(1 0 0 -1 0 612)" d="M-396-306V918h1584V-306z"/></clipPath>
<g clip-path="url(#a)">
<path stroke-width="1.08" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M50 50 h100"/>
<path stroke-width="1.08" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M50 100 h0"/>
</g>
</svg>

Used Versions

SVG: 3.4.7
.Net Framework: 4.8.1
Operating system: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions