SVGでたくさんの円を表示したいと思います。私たち一人一人にイメージが含まれています。
私はそれを行う方法を見つけました。パターンを定義します:
<defs>
<pattern preserveAspectRatio="true" patternContentUnits="objectBoundingBox" height="1" width="1" y="0" x="0" id="imageExample">
<image height="1" width="1" y="0" x="0" xlink:href="img/imageExample.png"/>
</pattern>
</defs>
そして、円を表示します:
<circle cx=x cy=y r=r stroke="white" stroke-width="2" fill="url(#imageExample)"/>
私の質問は: 1000 個の円を表示したい場合、1000 個のパターンを定義する必要がありますか?
[編集] 円ごとに異なる背景画像を使用したいのですが、申し訳ありません。