Commons:WikiProject BSicon/Code

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Documentationview · edit · history · purge ]

Usage[edit]

This template is used to display one or two sample icons and their SVG source code snippet at BSicon/Icon geometry and SVG code neatness.

Parameters[edit]

Unnamed[edit]

 1  required Icon to be displayed
 2  required Title/description
 

Named[edit]

t optional Second icon to be displayed
c required Code snippet to be displayed
tc optional Second code snippet to be displayed

Examples[edit]

The code
{{COM:WPBS/C|uSTR|Line through|c=<path d="M 250,0 V 500" stroke-width="100" stroke="#003399" />
}}

produces:

Line through
<path d="M 250,0 V 500" stroke-width="100" stroke="#003399" />

The code
{{COM:WPBS/C|ABZ4+2f|t=utABZ4+2f|Junction of lines from corner 2 and front to corner 4|c=<path d="M 500,500 L 0,0 36,36 C 125,125 250,250 250,500" stroke-width="100" stroke="#BE2D2C" fill="none" />|tc=<defs><br />&nbsp;<mask id="mask"><br />&nbsp;&nbsp;<rect x="-100" y="-100" width="1200" height="1200" fill="white" /><br />&nbsp;&nbsp;<path d="M 250,500 C 250,250 125,125 36,36 L 0,0 500,500" stroke-width="20" fill="none" stroke="black"/><br />&nbsp;</mask><br /></defs><br /><g fill="none" stroke="#BE2D2C" mask="url(#mask)"><br />&nbsp;<path d="M 36,36 C 125,125 250,250 250,500" stroke-width="100" stroke-dasharray="24.1,51,50,51,50,53,50,62,50,61.7" /><br />&nbsp;<path d="M 503.5,461 L 39,-3.5 M 461,503.5 L -3.5,39" stroke-width="40" stroke-dasharray="50,51.15" /><br /></g>
}}

produces:

Junction of lines from corner 2 and front to corner 4
<path d="M 500,500 L 0,0 36,36 C 125,125 250,250 250,500" stroke-width="100" stroke="#BE2D2C" fill="none" />
<defs>
 <mask id="mask">
  <rect x="-100" y="-100" width="1200" height="1200" fill="white" />
  <path d="M 250,500 C 250,250 125,125 36,36 L 0,0 500,500" stroke-width="20" fill="none" stroke="black"/>
 </mask>
</defs>
<g fill="none" stroke="#BE2D2C" mask="url(#mask)">
 <path d="M 36,36 C 125,125 250,250 250,500" stroke-width="100" stroke-dasharray="24.1,51,50,51,50,53,50,62,50,61.7" />
 <path d="M 503.5,461 L 39,-3.5 M 461,503.5 L -3.5,39" stroke-width="40" stroke-dasharray="50,51.15" />
</g>