Skip to content

Support for different canvas units (SVGLength) #42

Description

@xhruso00

SVG files that use different units are currently rasterized as pixels. 10cm becomes 10px

<svg height="10cm" width="10cm" xmlns="http://www.w3.org/2000/svg">
    <polygon points="100,10 40,180 190,60 10,60 160,180" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" />
</svg>

https://developer.mozilla.org/en-US/docs/Web/API/SVGLength

https://github.com/WebKit/WebKit/blob/3b35a19d0a910ba3376525d9dae67fe6b4d5016f/Source/WebCore/svg/SVGLength.h

Screenshot 2024-05-25 at 19 06 45

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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