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
m
Line 2: Line 2:
 
left:{{{1}}}px;  
 
left:{{{1}}}px;  
 
bottom:{{{2}}}px;
 
bottom:{{{2}}}px;
transform-origin: {{#expr: ((({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5)/100}}% -50%;
+
transform-origin: 0% -50%;
 
transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
 
transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
-webkit-transform-origin: {{#expr: ((({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5)/100}}% -50%;
+
-webkit-transform-origin: 0% -50%;
 
-webkit-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
 
-webkit-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
-ms-transform-origin: {{#expr: ((({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5)/100}}% -50%;
+
-ms-transform-origin: 0% -50%;
 
-ms-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
 
-ms-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
-moz-transform-origin: {{#expr: ((({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5)/100}}% -50%;
+
-moz-transform-origin: 0% -50%;
 
-moz-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
 
-moz-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
-o-transform-origin: {{#expr: ((({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5)/100}}% -50%;
+
-o-transform-origin: 0% -50%;
 
-o-transform:rotate({{#expr:({{atan2|y={{#expr:{{{4}}}-{{{2}}}}}|x={{#expr:{{{3}}}-{{{1}}}}}}})*180/pi}}deg);
 
-o-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;
 
width: {{#expr: (({{{3}}}-{{{1}}})^2+({{{4}}}-{{{2}}})^2)^0.5}}px;
Line 21: Line 21:
 
Planned to be used for trade lanes in [[Template:System Map]].
 
Planned to be used for trade lanes in [[Template:System Map]].
 
==Result==
 
==Result==
<pre>{{User:Space/Template:DrawLine|200|200|300|100|3|purple}}{{User:Space/Template:DrawLine|100|0|0|100|3|pink}}{{User:Space/Template:DrawLine|0|100|100|0|3|yellow}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|-100|3|cyan}}{{User:Space/Template:DrawLine|0|0|-100|100|3|green}}{{User:Space/Template:DrawLine|0|0|-100|-100|3|black}}{{User:Space/Template:DrawLine|7000|-10000|800|1300|40|red}} (and a bunch of newlines)</pre>
+
<pre>{{User:Space/Template:DrawLine|200|200|300|100|3|purple}}{{User:Space/Template:DrawLine|100|0|0|100|3|pink}}{{User:Space/Template:DrawLine|0|100|100|0|3|yellow}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|-100|3|orange}}{{User:Space/Template:DrawLine|0|0|-100|100|3|green}}{{User:Space/Template:DrawLine|0|0|-100|-100|3|black}}{{User:Space/Template:DrawLine|7000|-10000|800|1300|40|red}} (and a bunch of newlines)</pre>
  
  
Line 30: Line 30:
  
  
{{User:Space/Template:DrawLine|200|200|300|100|3|purple}}{{User:Space/Template:DrawLine|100|0|0|100|3|pink}}{{User:Space/Template:DrawLine|0|100|100|0|3|yellow}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|-100|3|cyan}}{{User:Space/Template:DrawLine|0|0|-100|100|3|green}}{{User:Space/Template:DrawLine|0|0|-100|-100|3|black}}{{User:Space/Template:DrawLine|7000|-10000|800|1300|40|red}}
+
{{User:Space/Template:DrawLine|200|200|300|100|3|purple}}{{User:Space/Template:DrawLine|100|0|0|100|3|pink}}{{User:Space/Template:DrawLine|0|100|100|0|3|yellow}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|-100|3|orange}}{{User:Space/Template:DrawLine|0|0|-100|100|3|green}}{{User:Space/Template:DrawLine|0|0|-100|-100|3|black}}{{User:Space/Template:DrawLine|7000|-10000|800|1300|40|red}}
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Revision as of 18:59, 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|200|200|300|100|3|purple}}{{User:Space/Template:DrawLine|100|0|0|100|3|pink}}{{User:Space/Template:DrawLine|0|100|100|0|3|yellow}}{{User:Space/Template:DrawLine|0|0|100|100|3|#00BFFF}}{{User:Space/Template:DrawLine|0|0|100|-100|3|orange}}{{User:Space/Template:DrawLine|0|0|-100|100|3|green}}{{User:Space/Template:DrawLine|0|0|-100|-100|3|black}}{{User:Space/Template:DrawLine|7000|-10000|800|1300|40|red}} (and a bunch of newlines)