Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Masked SVG rendered inconsistently #78

Description

@LaurenzV

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.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions