Template:Coordinate to Pixel: Difference between revisions

From My Wiki
Jump to navigation Jump to search
imported>Tlosk's Bot
No edit summary
imported>Tlosk's Bot
No edit summary
Line 31: Line 31:
{{Coordinate to Pixel|10.5|N|128|3}}
{{Coordinate to Pixel|10.5|N|128|3}}


{{#switch: {{uc:N}}
| N = {{#expr: 128 - 3 - 10.5 / 102.8 * 128 round 0}}
| 0
}}
</noinclude>
</noinclude>

Revision as of 15:11, 20 January 2009

{{#vardefine:pixel|0}}


Syntax

{{Coordinate to Pixel
 | <Value> (0.0 to 102.8)
 | <Direction> (N E S W)
 | <Scale> (128, 256, 512, etc)
 | <Offset> (Half point image width rounded up, minus any border width)
}}

For example:

{{Coordinate to Pixel|10.5|N|128|3}}

gives the result:

{{#vardefine:pixel|0}}

{{#var:pixel}}



112