WoW:API Texture SetTexCoord
Limit the region of a texture drawn by the Texture widget.
obj:SetTexCoord(minX, maxX, minY, maxY);
Parameters
Arguments
- (minX, maxX, minY, maxY)
- minX
- Number - Left-most coordinate of bounding box (range: 0-1)
- maxX
- Number - Right-most coordinate of bounding box (range: 0-1)
- minY
- Number - Bottom-most coordinate of bounding box (range: 0-1)
- maxY
- Number - Top-most coordinate of bounding box (range: 0-1)
Example
getglobal("MyAddOnTexture" .. id):SetTexCoord(0, 0.5, 0.5, 1);
Details
- Use this function to select a sub-region of a texture for display in a Texture widget. Note that the coordinates are normalised, and that the origin is the bottom left corner.