2
我想隱藏矩形外的任何東西。 (這我已成功完成裁剪)。但另一個條件是,「也隱藏了黑色大圓圈內的任何東西」。現在我該如何實現這一目標?如何排除Svg中的clippath區域
在下面的例子中,'黃圈'必須被消除'。
看到以下圖片查看詳細
- 原文: -
期望: -
下面是我的SVG編碼: -
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500" height="500">
<g>
<rect x="50" y="50" width="200" height="200" stroke="1" fill="red"/>
<circle cx="180" cy="150" r="30" stroke="blue" />
</g>
<g clip-path = "url(#clip1)">
<circle cx="180" cy="150" r="10" stroke="blue" fill="yellow" />
</g>
<clipPath id = "clip1">
<rect x="50" y="50" width="200" height="200" stroke="1" fill="red"/>
</clipPath>
</svg>
總是黑圈不透明?如果是這樣,你並不需要使用剪裁,只要確保把它放在最上面。 –
不是。要點是如何隱藏那個黑圈的邊界內的任何東西。 – RashFlash
那麼有什麼問題 - 像Erik建議的那樣,在所有其他事物上繪製圈子? –