The API is no longer being updated here until further notice. |
Texture is a subclass of LayeredRegion to display an image.
Class Hierarchy
Texture extends LayeredRegion.
- UIObject
- Region
- LayeredRegion
- Texture
- LayeredRegion
- Region
Construction
- In Lua
- Frame:CreateTexture([name, layer, inheritsFrom, subLayer]) - Constructs a single Texture and returns a handle to it.
- CreateTexturePool(parent, layer, subLayer, textureTemplate, resetterFunc) - Constructs an object pool from which to Acquire() FontStrings.
- In XML
- <Texture> - Resides inside a
<Layer></Layer>
within the<Layers></Layers>
element of a <Frame>.
Methods
Texture has all the methods from LayeredRegion plus the following:
- Fundamental Properties
- Texture:GetAtlas()
- Texture:GetTexCoord() - Gets the 8 texture coordinates that map to the Texture's corners - New in 1.11.
- Texture:GetTexture() - Gets this texture's current texture path.
- Texture:GetTextureFileID()
- Texture:GetTextureFilePath()
- Texture:SetAtlas(atlasName [, useAtlasSize, filterMode])
- Texture:SetTexCoord(minX, maxX, minY, maxY or ULx, ULy, LLx, LLy, URx, URy, LRx, LRy) - Modifies the region of a texture drawn by the Texture widget.
- Texture:SetTexture(file [, horizWrap, vertWrap, filterMode]) - Changes the texture displayed by the Texture widget.
- Position (extending Region)
- Texture:GetHorizTile()
- Texture:GetRotation()
- Texture:GetVertTile()
- Texture:SetHorizTile(horizTile) - Sets whether the widget should adjust horizontal texture coordinates based on texture and widget dimensions.
- Texture:SetRotation(angle [, cx, cy]) - Applies a counter-clockwise rotation to the texture.
- Texture:SetVertTile(horizTile) - Sets whether the widget should adjust vertical texture coordinates based on texture and widget dimensions.
- Masks and Shading (extending LayeredRegion)
- Texture:AddMaskTexture(maskTexture)
- Texture:GetBlendMode() - Returns the AlphaMode.
- Texture:GetDesaturation()
- Texture:GetMaskTexture(index)
- Texture:GetNumMaskTextures()
- Texture:GetVertexColor() - Gets the vertex color for the Texture.
- Texture:IsDesaturated() - Gets the desaturation state of this Texture. - New in 1.11
- Texture:RemoveMaskTexture(maskTexture)
- Texture:SetBlendMode(mode) - Defines the AlphaMode.
- Texture:SetColorTexture(r, g, b [, a]) - Creates a solid-color texture
- Texture:SetDesaturated(flag) - Set whether this texture should be displayed with no saturation (Note: This has a return value)
- Texture:SetDesaturation()
- Texture:SetGradient(orientation, minR, minG, minB, maxR, maxG, maxB)
- Texture:SetGradientAlpha(orientation, minR, minG, minB, minA, maxR, maxG, maxB, maxA)
- Texture:SetMask(maskName)
- Misc
- Texture:GetNonBlocking()
- Texture:GetVertexOffset(vertexIndex)
- Texture:IsSnappingToPixelGrid()
- Texture:SetNonBlocking()
- Texture:GetTexelSnappingBias()
- Texture:SetTexelSnappingBias(texelSnappingBias) where texelSnappingBias is [0-1]
- Texture:SetSnapToPixelGrid()
- Texture:SetVertexOffset(vertexIndex, offsetX, offsetY)
Patch changes
- Patch 1.1.0 (2004-11-07): Included in the original World of Warcraft release.[1]
References
- ^ 2014-12-06, UI.xsd, version 1.1.2.4115, near line 325, archived at Townlong-Yak