Has anyone been able to successfully use the clip-path attribute on embedded SVGs in Perspective?
In most cases I have been able to approximate what I needed by using a path with its “fill-rule” attribute set to “evenodd” while having the “d” attribute double back over the sections that I needed to clip, but this is proving difficult when trying to clip paths with curves in them.
Take the following SVG as an example:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 20 20">
<defs>
<clipPath id="rectClipPath">
<rect x="0" y="5" width="20" height="15"/>
</clipPath>
</defs>
<g clip-path="url(#rectClipPath)">
<circle cx="10" cy="10" r="10" fill-rule="evenodd" fill="rgb(0,0,0)"/>
</g>
</svg>
It displays correctly in a web browser, where the rectangle clip-path only allows the lower 3/4s of the circle to be shown:
But when the same SVG is embedded in a view in Perspective, it seems to drop the clip-path information entirely:
Am I configuring this incorrectly or is the clip-path attribute not able to be used within Perspective? If it’s the latter, it would be pretty helpful to get a list of Perspective-friendly SVG attributes.