WoW:API Texture SetTexCoord

Revision as of 04:10, 3 November 2005 by WoWWiki>Tcxxs
SetTexCoord -Documentation by tcxxs-

Limit the region of a texture drawn by the Texture widget.

obj:SetTexCoord(left,right,top,bottom);

Parameters

Arguments

(left,right,top,bottom)
Number - (range: 0-1)

Note

The function cut a sub-region,use the new TopLeftPoint is (left,top),new BottomRight is (right,bottom),so you can use the function to rotate the texture or sub-region

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