API Texture SetTexture

Changes the texture of a Texture widget. texture:SetTexture("filename" or fileID[, "horizWrap"[, "vertWrap"[, "filterMode"]]])

Arguments

 * filename : String - Path to a texture image.
 * fileID : Number (fileID) - ID number specifying a Blizzard texture file. Returned by various API functions.
 * horizWrap : String - Wrap behavior specifying what should appear when sampling pixels with an x coordinate outside the (0, 1) region of the texture coordinate space. The following wrap modes may be specified:
 * {| class="darkbox"

! Mode !! Behavior
 * "CLAMP" (default) || The edges of the texture are repeated infinitely.
 * "CLAMPTOBLACK" || Fills the rest of the texture coordinate space with black.
 * "CLAMPTOBLACKADDITIVE" || Fills the rest of the texture coordinate space with a transparent black.
 * "CLAMPTOWHITE" || Fills the rest of the texture coordinate space with white.
 * "REPEAT" (or ) || The texture is repeated (in its entirety) infinitely.
 * "MIRROR" || The texture is repeated (in its entirety) infinitely, with adjacent instances mirrored.
 * }
 * vertWrap : String - Wrap behavior specifying what should appear when sampling pixels with a y coordinate outside the (0, 1) region of the texture coordinate space.
 * NOTE: As of 7.3.5.26972, this parameter is ignored, and the vertical wrapping mode is usually set to the value passed for.
 * "REPEAT" (or ) || The texture is repeated (in its entirety) infinitely.
 * "MIRROR" || The texture is repeated (in its entirety) infinitely, with adjacent instances mirrored.
 * }
 * vertWrap : String - Wrap behavior specifying what should appear when sampling pixels with a y coordinate outside the (0, 1) region of the texture coordinate space.
 * NOTE: As of 7.3.5.26972, this parameter is ignored, and the vertical wrapping mode is usually set to the value passed for.
 * NOTE: As of 7.3.5.26972, this parameter is ignored, and the vertical wrapping mode is usually set to the value passed for.


 * filterMode : String - Texture filtering mode to use, one of: "LINEAR" (default; bilinear filtering), "TRILINEAR" (also sampling mipmaps), or "NEAREST" (nearest-neighbor filtering).

Details

 * Pixels outside the (0,0)--(1,1) square in the texture coordinate space (which contains the full original texture) may be sampled when texture coordinates are explicitly modified by, or implicitly modified by the tiling mechanism when the size of the texture widget is greater than the default size of the supplied texture file.
 * Custom images must be in BLP, JPEG, or TGA format, and must have power-of-two dimensions. TGA images may have 8, 24, or 32 bits per pixel for grayscale, RGB, and RGBA images respectively; RLE is supported.
 * The game will only display image files that existed when it was started, so you may need to restart the game for newly-added custom textures to appear.
 * Textures are loaded asynchronously, the initial value of  will be 0,0 until   becomes true, after which it will be the native size of the texture (e.g. 64x64). See also