Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クリップされたオブジェクトの表示されているx境界とy境界を見つけて、その周りに他のオブジェクトを配置できるようにする必要があります。ただし、仕様ではgetBBoxクリップパスが考慮されていないため、バウンディングボックスを使用できません。クリップされたオブジェクトの表示制限をどのように見つけることができますか?
getBBox
<use>clipPath内のパスを参照する非表示の要素を作成し、そのバウンディングボックスを取得します。次に、オブジェクトのバウンディングボックスとuseオブジェクトの共通部分が必要です。
<use>
<defs> <clipPath id="clipPath"> <path id="path" ...> </clipPath> </defs> <use id="clipPathBounds" visibility="hidden" xlink:href="#path"/>