WoW:API Texture SetTexCoord

From AddOn Studio
Revision as of 05:12, 8 April 2005 by WoWWiki>WoWWiki-Fitz
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
SetTexCoord -Documentation by fitz-

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.

Template:WoW API