[rdfweb-dev] Tiny foaf icon in svg

Leandro Mariano Lopez llopez at x...
Tue Nov 26 14:29:20 UTC 2002


Ian Davis wrote:
> I made an SVG version of my tiny FOAF icon:
> 
> http://internetalchemy.org/2002/11/foafTiny.svg
> 
> It's my first attempt at SVG so go easy on me.
> 
Very good job Ian! Here's a tip: use SVG symbol definition feature, like 
this:

<svg xmlns="http://www.w3.org/2000/svg">
<title>FOAF Tiny Icon</title>
<desc>
An icon to represent a link to a FOAF file
</desc>

<defs>
<symbol id='face'>
<circle cx="6" cy="6" r="4.5" stroke="#000000" stroke-width="1" />
<circle cx="4.5" cy="5.5" r="1" fill="#000000" />
<circle cx="7.5" cy="5.5" r="1" fill="#000000" />
</symbol>
</defs>

<use xlink:href='#face' fill='#99c' transform='translate(6, 6)' />
<use xlink:href='#face' fill='#f66' transform='translate(10.5, 10)' />
<use xlink:href='#face' fill='#ff9' transform='translate(22, 8)' />
<use xlink:href='#face' fill='#9c9' transform='translate(16, 6)' />

</svg>

You'll get the same result, but you avoid coding repetitive elements. 
And also you can create a new symbol with the entire group. I've 
attached both examples in this mail.

HTH!!!!!!

inkel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/svg+xml
Size: 1020 bytes
Desc: not available
Url : http://lists.usefulinc.com/pipermail/foaf-dev/attachments/20021126/79b4e940/attachment-0002.svgz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/svg+xml
Size: 1298 bytes
Desc: not available
Url : http://lists.usefulinc.com/pipermail/foaf-dev/attachments/20021126/79b4e940/attachment-0003.svgz


More information about the foaf-dev mailing list