Difference between revisions of "Template:UO Image"
BrianFreud (talk | contribs) m |
BrianFreud (talk | contribs) m |
||
Line 78: | Line 78: | ||
{{#vardefine: showcoords|{{{6|}}} }} | {{#vardefine: showcoords|{{{6|}}} }} | ||
}} }} | }} }} | ||
− | <div style="display:inline-block;"><div style="position: relative; | + | <div style="display:inline-block;"><div style="position: relative;overflow: hidden;display:inline-block;<!-- |
+ | -->{{#if: {{{magnify|}}}|transform:scale({{{magnify|1}}})<!-- | ||
+ | -->{{#vardefine: translate|{{#expr: {{#expr: {{{magnify}}} - 1}} * {{#expr: {{#var: pixels}} / 2}} }} }}<!-- | ||
+ | -->translate({{#var:translate}}px,{{#var:translate}}px);<!-- | ||
+ | -->{{#vardefine: diameter|{{#expr: {{{magnify}}} * {{#expr: {{#var:pixels}} * 2}} }} }}<!-- | ||
+ | -->width:{{#var: diameter}}px;height:{{#var: diameter}}px;<!-- | ||
+ | -->|width:{{#expr:{{#var:pixels}}*2}}px;height:{{#expr:{{#var:pixels}}*2}}px;}} | ||
+ | "><div style="-webkit-clip-path: circle({{#var:pixels}}px at {{#var:x}}px {{#var:y}}px); clip-path: circle({{#var:pixels}}px at {{#var:x}}px {{#var:y}}px); transform: translate({{#expr: {{#var:pixels}}-{{#var:x}} }}px,{{#expr: {{#var:pixels}}-{{#var:y}} }}px);">[[File:MAP{{#switch: {{lc:{{{2|}}} }}|felucca=0 | ||
|trammel=1 | |trammel=1 | ||
|ilshenar=2 | |ilshenar=2 |
Revision as of 17:29, 13 September 2016
Maps
{{UO_Image|map|facet|x|y|r|b|magnify=xxx}} Where: facet = felucca, trammel, ilshenar, tokuno, ter mur, or eodon x and y = coords of the center of the circle r = the radius of the circle to draw (in pixels) b = optional, set to 'yes' to also show the coordinates of the center of the circle magnify=xxx = optional. set 'xxx' to the amount to magnify the image. (2 = 200%, 3 = 300%, etc) Examples: Vesper {{UO_Image|map|felucca|2926|842|215}} Kotl City {{UO_Image|map|eodon|577|2371|153}} Sea Market {{UO_Image|map|trammel|4550|2355|75|yes}}
Result:
You can also use sextant coordinates.
{{UO_Image|map|facet|c|x|NS|y|EW|r|b}} Where: facet = felucca, trammel, ilshenar, tokuno, ter mur, or eodon c = coordinate system:
- 1 = Britannia (Tram or Fel)
- 2 = Lost Lands
- 3 = Ilshenar
- 4 = Malas
- 5 = Tokuno
- 6 = Ter Mur
- 7 = Eodon
x and y = sextant coords of the center of the circle. Use a comma to separate degrees from minutes. (For 123o 8'N, you would use '123,8'.) NS = N or S, whichever is applicable for the sextant location EW = E or W, whichever is applicable for the sextant location r = the radius of the circle to draw (in pixels) b = optional, set to 'yes' to also show the coordinates of the center of the circle Example: Location on Ice Island at 123o 8'N 172o 59'W {{UO_Image|map|felucca|1|123,8|N|172,59|W|75|yes}}
Result:
Shard Shields
{{UO_Image|shard|name|size}} Where: name = the name of the shard link = optional, the name of the page you want linked to from the image. size = optional, size in pixels. By default it is 60px. Examples: Baekdu: {{UO_Image|shard|Baekdu}} Chesapeake: {{UO_Image|shard|Chesapeake}} Formosa: {{UO_Image|shard|Formosa}} Yamato: {{UO_Image|shard|Yamato|60}}
Result:
Icons
{{UO_Image|icon|name|size}} Where: name = the name of the icon size = optional, size in pixels. By default it is 40px.
Valid icons:
- Caution