Comment 4 for bug 901198

Revision history for this message
su_v (suv-lp) wrote :

Correction: 'maskUnits' is not relevant for the units used for the mask content, and 'maskContentUnits' defaults to 'userSpaceOnUse' if not specified.

Inkscape also fails to consider the second object 'maskout' if defining the mask with 'maskUnits' and 'maskContentUnits' explicitly set to 'userSpaceOnUse', and using corresponding width/height and x/y values. In this case, like with the original example, only putting the two objects inside a group inside the mask seems to render as expected in Inkscape (and like in other SVG viewers like e.g. Squiggle (Batik 1.7)):

  <g id="masked_rect">
    <mask id="createhole" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse">
      <g>
        <rect class="inmask" id="maskin" width="180" height="180" x="10" y="10" />
        <rect class="outmask" id="maskout" width="80" height="80" x="60" y="60" />
      </g>
    </mask>
    <rect class="seeme" id="outsiderect" mask="url(#createhole)" width="180" height="180" x="10" y="10" />
  </g>