API Texture SetHorizTile

Sets whether the widget should adjust horizontal texture coordinates based on texture and widget dimensions. Texture:SetHorizTile(horizTile)

Arguments

 * horizTile : Boolean - If true, texture coordinates will be adjusted such that each texture pixel takes up one horizontal unit within the widget.

Example
local t = UIParent:CreateTexture t:SetSize(128, 128) t:SetPoint("CENTER") t:SetHorizTile(true) t:SetTexture("Interface/ContainerFrame/UI-Icon-QuestBang", "MIRROR", "MIRROR")

Details

 * If the widget's width is smaller than the pixel width of the texture it displays, the texture will be cropped. The top left corner of the texture remains anchored to the top left corner of the widget.
 * If the widget's width is greater than the pixel width of the texture it displays, the widget's horizontal wrapping mode will determine the content of the pixels to the right of the original texture. To repeat (i.e., tile) the texture, the "REPEAT" horizontal wrapping mode should be specified when assigning the texture.
 * The tiling mechanism adjusts texture coordinates at an arbitrary point during rendering, not necessarily as part of the or Texture:SetHorizTile call. This overwrites the existing texture coordinates, and may occur more than once.
 * This function does not behave correctly for most default icons (textures in Interface/ICONS).