Widget/API/SetTexCoord

__NOTOC__
Sets the offsets into an image to use as a texture.
MyTexture:SetTexCoord(left, right, top, bottom);
== Parameters ==
=== Arguments ===
:;left
::number - Offset into image defining the left side.
:;right
::number - Offset into image defining the right side.
:;top
::number - Offset into image defining the top.
:;bottom
::number - Offset into image defining the bottom.
=== Returns ===
:;None
== Example ==
Texture:SetTexCoord(0.25,0.75,0.25,0.75);
== Notes ==
The texture coordinates given are always between 0 and 1. They can be calculated by dividing the pixel position you want and divide by the width or height as appropriate.
If the left side is larger than the right side, the image will be mirrored left to right. If the top is larger than the bottom, the image will be flipped vertically.
== Related Pages ==
* Widget (Overview)
Category:Widget/API Category:Widget/Class/Texture