API TextureBase SetTexture

Sets the texture to an image.
 TextureBase:SetTexture([textureAsset, wrapModeHorizontal, wrapModeVertical, filterMode])
==Arguments==
To clear the texture call this without any params or nil.
:;textureAsset: - A FileID or the file path to a texture.
:;wrapModeHorizontal: - If is enabled, sets the wrap behavior for pixels with an x coordinate outside the (0, 1) region of the texture coordinate space.
:;wrapModeVertical: - If is enabled, sets the wrap behavior for pixels with a y coordinate outside the (0, 1) region of the texture coordinate space.
:: 
wrapMode 	Description
CLAMP 	Default; extends the texture edges infinitely.
CLAMPTOWHITE 	Fills the overflow with white.
CLAMPTOBLACK 	Fills the overflow with black.
CLAMPTOBLACKADDITIVE	Fills overflow with a transparent black.
REPEAT (or true) 	Repeats the whole texture infinitely.
MIRROR 	Repeats the whole texture infinitely, mirroring adjacent iterations.
:;filterMode:
:: 
filterMode	Description
LINEAR 	Default; bilinear filtering.
TRILINEAR 	Also sampling mipmaps.
NEAREST 	Nearest-neighbor filtering.
==Details==
* Custom images must be in BLP, JPEG, PNG, or TGA format with power-of-two dimensions (e.g. 16x16, 8x32, 256x64). TGA images may have 8bpp grayscale, 24bpp RGB, or 32 bpp RGBA; RLE is supported.
** Unlike other formats, PNG files must explicitly include the ".png" extension when their file path is used in-game.
* Pixels outside the texture coordinate space may be sampled explicitly by , or implicitly by the tiling mechanism when the texture widget is larger than the default size of the texture file.
* Textures load asynchronously. For example, texture:GetSize() returns 0,0 until becomes true; and then it returns the native texture size. See also TextureLoadingGroupMixin:IsFullyLoaded.
* This API has a success return value but it has no significance since it always returns true, even for invalid FileIDs or parameters.
==Example==
Shows an icon on the screen.
local tex = UIParent:CreateTexture()
tex:SetPoint("CENTER")
tex:SetTexture(134532) -- interface/icons/inv_mushroom_11
The texture will be stretched or compressed if tiling is disabled.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang")
tex:SetSize(256, 64)
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang")
tex:SetSize(32, 64)
===Wrap Mode===
When tiling is enabled, wrap mode specifies how pixels outside the texture coordinate space will be handled.
CLAMP - If the wrap mode is omitted it defaults to clamp.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang")
tex:SetSize(256, 64)
tex:SetHorizTile(true)
Clamping extends the texture edges infinitely. This texture illustrates how the right and bottom edges and the bottomright pixel get extended.
tex:SetTexture("Interface/RAIDFRAME/Shield-Overlay", "CLAMP", "CLAMP")
tex:SetSize(64, 64)
tex:SetScale(2)
tex:SetHorizTile(true)
tex:SetVertTile(true)
CLAMPTOWHITE - Fills everything outside the texture coordinate space with opaque white.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "CLAMPTOWHITE")
tex:SetSize(256, 64)
tex:SetHorizTile(true)
CLAMPTOBLACK - Fills everything outside the texture coordinate space with opaque black.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "CLAMPTOBLACK")
tex:SetSize(256, 64)
tex:SetHorizTile(true)
CLAMPTOBLACKADDITIVE - Additive clamping to black means every pixel that is outside the unit square containing the original texture is filled with transparent black pixels (R=G=B=A=0). The transparent pixels being black can matter in specific situations where the AlphaMode ignores the alpha channel.
tex:SetTexture("Interface/Buttons/YELLOWORANGE64", "CLAMPTOBLACKADDITIVE")
tex:SetSize(128, 64)
tex:SetHorizTile(true)
API_TextureBase_SetTexture_11.png|link=|CLAMP
API_TextureBase_SetTexture_12.png|link=|CLAMPTOBLACKADDITIVE
REPEAT - Sets the wrapMode to repeat horizontally.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "REPEAT")
tex:SetSize(256, 64)
tex:SetHorizTile(true)
Repeats horizontally and vertically
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "REPEAT", "REPEAT")
tex:SetSize(128, 128)
tex:SetHorizTile(true)
tex:SetVertTile(true)
MIRROR - Sets the wrapMode to mirror vertically.
tex:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "MIRROR")
tex:SetSize(128, 64)
tex:SetHorizTile(true)
==Patch changes==
===References===