YellowWarningTriangle.png This wiki is closed in favour of the new wiki. Information shown is likely to be very out of date.

Difference between revisions of "User:Space/Template:DrawLine"

From Discovery Wiki
Jump to navigationJump to search
m (Oh. It's working completely as it should, just not like I expected. There we go! Well, it still won't draw lines downwards using negative y values. Minor details.)
m
Line 1: Line 1:
 
<includeonly> <div style="position:relative; left:{{{1}}}px; bottom:{{{2}}}px; -webkit-transform-origin: 0% 100%; -webkit-transform:rotate(-{{#expr:{{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr: {{{3}}}-{{{1}}}}}}}*180/pi}}deg); width: {{#expr: (({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5}}px; height: {{{5}}}px; background: {{{6}}};"></div></includeonly>
 
<includeonly> <div style="position:relative; left:{{{1}}}px; bottom:{{{2}}}px; -webkit-transform-origin: 0% 100%; -webkit-transform:rotate(-{{#expr:{{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr: {{{3}}}-{{{1}}}}}}}*180/pi}}deg); width: {{#expr: (({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5}}px; height: {{{5}}}px; background: {{{6}}};"></div></includeonly>
  
<noinclude>==Usage==
+
<noinclude>{{Work in progress|[[User:Space|Space]]}}==Usage==
 
<nowiki>{{User:Space/Template:DrawLine|x1|y1|x2|y2|width in px|valid css color code or name}}</nowiki>
 
<nowiki>{{User:Space/Template:DrawLine|x1|y1|x2|y2|width in px|valid css color code or name}}</nowiki>
 +
 +
Planned to be used for trade lanes in [[Template:System Map]].
 
==Result==
 
==Result==
 
<pre>{{User:Space/Template:DrawLine|1|-2|0|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|98|102|100|-100|3|#00BFFF}} (and a bunch of newlines)</pre>
 
<pre>{{User:Space/Template:DrawLine|1|-2|0|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|98|102|100|-100|3|#00BFFF}} (and a bunch of newlines)</pre>

Revision as of 14:58, 8 April 2013


150px-WIP2.png This page is currently being developed by one or more editors being led by Space. Please refer to the talk page to learn about and/or contribute to the completion of this page. You can also contact the leader on their discussion page.

Talk Page

Usage

{{User:Space/Template:DrawLine|x1|y1|x2|y2|width in px|valid css color code or name}}

Planned to be used for trade lanes in Template:System Map.

Result

{{User:Space/Template:DrawLine|1|-2|0|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|98|102|100|-100|3|#00BFFF}} (and a bunch of newlines)