Difference between revisions of "DrawLine"

From Sega Retro

Line 1: Line 1:
<span style="display:inline-block; vertical-align:top; border:1px {{#if:{{{dashed|}}}|dashed|solid}} {{{colour|#000}}}; position: relative; left:{{{x1|}}}px; top:{{{y1}}}px; height:0px; width:{{{w}}}px; margin-right:-{{{w}}}px; {{#if:{{{angle|}}}|transform-origin: 0px 1px; transform: rotate(-{{{angle}}}deg)}}"></span><noinclude>[[Category:Sega Retro templates]]</noinclude>
+
<span style="display:inline-block; vertical-align:top; border:1px {{#if:{{{dashed|}}}|dashed|solid}} {{{colour|#000}}}; position: relative; left:{{{x1|}}}px; top:{{{y1}}}px; height:0px; width:{{{w}}}px; margin-right:-{{{w}}}px; {{#if:{{{angle|}}}|transform-origin: 0px 1px; transform: rotate(-{{{angle}}}deg)}}"></span><noinclude>
 +
 
 +
Template to draw a line.
 +
 
 +
This isn't an intelligent, HTML5/Javascript/whatever line where you define two points and line is drawn between them, because that method is incompatible with wikicode. This is an html span block of height 0 with a 1px border being rotated with CSS. Therefore:
 +
 
 +
<pre>{{Drawline
 +
| x1=
 +
| y1=
 +
| width=
 +
| angle=
 +
| colour=
 +
| dashed=
 +
}}</pre>
 +
 
 +
[[Category:Sega Retro templates]]</noinclude>

Revision as of 15:20, 20 June 2018

Template to draw a line.

This isn't an intelligent, HTML5/Javascript/whatever line where you define two points and line is drawn between them, because that method is incompatible with wikicode. This is an html span block of height 0 with a 1px border being rotated with CSS. Therefore:

{{Drawline
| x1=
| y1=
| width=
| angle=
| colour=
| dashed=
}}