Difference between revisions of "DrawLine"
From Sonic Retro
(Created page with "<span style="display:inline-block; vertical-align:top; border-top:1px {{#if:{{{dashed|}}}|dashed|solid}} {{{colour|#000}}}; position: relative; left:{{{x1|}}}px; top:{{{y1}}}p...") |
BSonirachi (talk | contribs) m (Text replacement - "Category:Sonic Retro templates" to "Category:Templates") |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <span style="display:inline-block; vertical-align:top; border-top: | + | <span style="display:inline-block; vertical-align:top; border-top:{{{thickness|1}}}px {{#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> |
{{SegaRetroTemplate}} | {{SegaRetroTemplate}} | ||
Template to draw a line. | Template to draw a line. | ||
Line 5: | Line 5: | ||
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: | 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>{{ | + | <pre>{{DrawLine |
| x1= | | x1= | ||
| y1= | | y1= | ||
− | | | + | | w= |
| angle= | | angle= | ||
| colour= | | colour= | ||
| dashed= | | dashed= | ||
+ | | thickness= | ||
}}</pre> | }}</pre> | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 19:20, 1 January 2022
This template has been manually copied from Sega Retro, specifically Template:DrawLine Technical restrictions prevent this template from being shared across multiple wikis. In the medium term, any changes should be made to the Sega Retro variant first, before manually copying the contents back here. As this is not an automatic process, this version of the template might also be out of date. |
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= | w= | angle= | colour= | dashed= | thickness= }}