Template:ProtoFluxConnector: Difference between revisions

Template page
Create SVG Template for Connector
 
Width bound to Height bound argument
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#tag:svg|
{{#switch:{{{Type|}}}
{{#switch:{{{Type|}}}
|Arrow=
|InputArrow=
<svg width="30" height="70" style="display:block;">
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
<polygon style="stroke-width:3px; stroke-linejoin: round;" points="0,0 0,70 30,35"></polygon>
|OutputArrow=
</svg>
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
|InputBox=
<polygon style="stroke-width:4px;" points="-2,2 -2,68 28,68 28,2"></polygon>
|OutputBox=
<polygon style="stroke-width:4px;" points="2,2 2,68 32,68 32,2"></polygon>
}}
 
{{#switch:{{{Segments|1}}}
|1=
|2=
<!-- InputBox-2 -->
<line stroke-width="3" x1="0" y1="35" x2="30" y2="35"></line>
|3=
<!-- InputBox-3 -->
<line stroke-width="3" x1="0" y1="23.333" x2="30" y2="23.3"></line>
<line stroke-width="3" x1="0" y1="46.667" x2="30" y2="46.6"></line>
|4=
<!-- InputBox-4 -->
<line stroke-width="3" x1="0" y1="17.5" x2="30" y2="17.5"></line>
<line stroke-width="3" x1="0" y1="35" x2="30" y2="35"></line>
<line stroke-width="3" x1="0" y1="52.5" x2="30" y2="52.5"></line>
}}
 
|viewBox=0 0 30 70|height={{{Height|70}}}|style=display: block;/**/{{{Style|}}}
}}
}}


<noinclude>
<noinclude>
Example:
Example:
<div style="fill:skyblue; stroke: white;">
<div style="fill:#606; stroke: #f0f;">
{{ProtoFluxConnector|Type=Arrow}}
{{ProtoFluxConnector|Type=InputArrow}}
{{ProtoFluxConnector|Type=OutputArrow}}
{{ProtoFluxConnector|Type=InputBox}}
{{ProtoFluxConnector|Type=InputBox|Segments=2}}
{{ProtoFluxConnector|Type=InputBox|Segments=3}}
{{ProtoFluxConnector|Type=InputBox|Segments=4}}
{{ProtoFluxConnector|Type=OutputBox}}
{{ProtoFluxConnector|Type=OutputBox|Segments=2}}
{{ProtoFluxConnector|Type=OutputBox|Segments=3}}
{{ProtoFluxConnector|Type=OutputBox|Segments=4}}
</div>
</div>
</noinclude>
</noinclude>

Latest revision as of 21:15, 11 February 2024


Example: