Bullseye

you are in savethegaywhale || msc || appendix2

sitemap

 

Appendix 2: Illustrative examples of code for <g> element.

<defs>

<g id = "circles">
<circle id="outer" cx="0" cy="0" r="38" style="fill:blue" />
<circle id="middle" cx="0" cy="0" r="25" style="fill:white"/>
<circle id="bull" cx="0" cy="0" r="14" style="fill:red"/>
</g>

</defs>

<g transform = "translate(110,150)>"
<use xlink:href="#circles"/>
</g>

<g transform = "translate(240,330)>"
<use xlink:href="#circles"/>
</g>

By placing the code within a <defs> element the code is in effect unused until called by a <use> element, at which point it can be exactly positioned. If required this can be done more than once, by calling a primitive shape or group using the unique user defined id tag.


back to top