Difference between revisions of "Template:Location mark+/x and y parameters"
Jump to navigation
Jump to search
imported>Droll (created) |
imported>Droll (tweaked) |
||
| Line 4: | Line 4: | ||
| text = This page is a part of the documentation for the template [[Template:Location mark+|Location mark+]] and [[Template:Location mark|Location mark]]. It may, also, be transcluded elsewhere. | | text = This page is a part of the documentation for the template [[Template:Location mark+|Location mark+]] and [[Template:Location mark|Location mark]]. It may, also, be transcluded elsewhere. | ||
}}</noinclude> | }}</noinclude> | ||
| − | |||
The values for the <code>x</code> and <code>y</code> parameters are the pixel coordinates of the image when it is scaled to a width of 1000 pixels. | The values for the <code>x</code> and <code>y</code> parameters are the pixel coordinates of the image when it is scaled to a width of 1000 pixels. | ||
| Line 21: | Line 20: | ||
::Where <math>X</math> and <math>Y</math> are the mouse cursor coordinates, <math>width</math> is the width of the image displayed on your computer and <math>x</math> and <math>y</math> are the values to assign to the <code>x</code> and <code>y</code> parameters. | ::Where <math>X</math> and <math>Y</math> are the mouse cursor coordinates, <math>width</math> is the width of the image displayed on your computer and <math>x</math> and <math>y</math> are the values to assign to the <code>x</code> and <code>y</code> parameters. | ||
| − | These computed coordinates are relative and will work even if the size of the image displayed in an article is changed by another user. Using simple pixel coordinate values would not have this advantage. Note that Wikipedia does not allow the [[aspect ratio (image)|aspect ratio]] of an image to be altered. | + | These computed coordinates are relative and will work even if the size of the image displayed in an article is changed by another user. Using simple pixel coordinate values would not have this advantage. Note that Wikipedia does not allow the [[aspect ratio (image)|aspect ratio]] of an image to be altered.<noinclude> |
| − | <noinclude> | + | |
[[Category:Template documentation pages]] | [[Category:Template documentation pages]] | ||
</noinclude> | </noinclude> | ||
Revision as of 22:45, 28 July 2011
| This page is a part of the documentation for the template Location mark+ and Location mark. It may, also, be transcluded elsewhere. |
The values for the x and y parameters are the pixel coordinates of the image when it is scaled to a width of 1000 pixels.
xis the pixel offset for the mark from the left edge of an image 1000px wide.yis the pixel offset for the mark from the top edge of an image 1000px wide.
There are at least two ways of obtaining these values:
- Download the image from the image's file page to your computer. Open the image in a graphics editor, such as GIMP or XnView. Scale (resize) the image to a width of 1000px and then note the X, Y coordinates when the mouse cursor points to to the location. Use these values directly.
- Download the image from the image's file page to your computer. Open the image in any image viewer that displays the coordinates of the cursor, such as Paint from Microsoft. Note the X, Y coordinates when the mouse cursor points to the location. Then:
- <math>\dfrac{1000\times{X}}{width} = x</math> and <math>\dfrac{1000\times{Y}}{width} = y</math>
- Where <math>X</math> and <math>Y</math> are the mouse cursor coordinates, <math>width</math> is the width of the image displayed on your computer and <math>x</math> and <math>y</math> are the values to assign to the
xandyparameters.
- Where <math>X</math> and <math>Y</math> are the mouse cursor coordinates, <math>width</math> is the width of the image displayed on your computer and <math>x</math> and <math>y</math> are the values to assign to the
These computed coordinates are relative and will work even if the size of the image displayed in an article is changed by another user. Using simple pixel coordinate values would not have this advantage. Note that Wikipedia does not allow the aspect ratio of an image to be altered.