Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masked SVG rendered inconsistently #78

Open
LaurenzV opened this issue Jul 16, 2024 · 0 comments
Open

Masked SVG rendered inconsistently #78

LaurenzV opened this issue Jul 16, 2024 · 0 comments

Comments

@LaurenzV
Copy link
Collaborator

LaurenzV commented Jul 16, 2024

Given the following SVG:

<svg id="svg1" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
    <title>Simple case</title>
    <mask id="mask1" mask-type="luminance">
        <rect id="rect1" x="0" y="0" width="200" height="200" fill="rgb(0 0 255)" opacity="1"/>
    </mask>
    <rect id="rect2" x="0" y="0" width="200" height="200" fill="rgb(255 0 0)" mask="url(#mask1)"/>
</svg>

Here is how they are rendered in different viewers:
mask_luminance-0

pdfium, pdf.js and pdfbox get the same output as Acrobat, while mupdf and Quartz get a slightly different output. Xpdf fails completely. So most likely a viewer issue, but would still be nice to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant