Textures are visible areas descended from LayeredRegion, that display either a color block, a gradient, or a graphic raster taken from a .tga or .blp file. Most of their methods relate to setting their appearance or their source information.
Textures are created as children of Frame elements in XML, or by calling Frame:CreateTexture()
from Lua. They cannot be reassigned from one frame to another, although you can create another texture on another frame that has the same source. They can also be created in XML with the virtual tag, allowing several similar textures to be created easily.
The WoW client only loads those files that existed when the client was first opened. If you add texture files to your addon's directory, you will need to restart your client in order for those textures to be loadable by the client. Changes to existing files do not have this same restriction.
Defined Methods
- Texture:GetAtlas() - This function is not yet documented
- Texture:GetHorizTile() - This function is not yet documented
- Texture:GetVertTile() - This function is not yet documented
- Texture:SetHorizTile() - This function is not yet documented
- Texture:SetShown() - This function is not yet documented
- Texture:SetVertTile() - This function is not yet documented
Inherited Methods
- Texture:IsForbidden() - This function is not yet documented
- isOver = Texture:IsMouseOver([topOffset [, leftOffset [, bottomOffset [, rightOffset]]]]) - Returns whether the mouse cursor is over the given region
- isType = Texture:IsObjectType("type") - Returns whether the object belongs to a given widget type
- isProtected, explicit = Texture:IsProtected() - Returns whether the region is protected
- shown = Texture:IsShown() - Returns whether the region is shown
- visible = Texture:IsVisible() - Returns whether the region is visible
- Texture:SetAllPoints([region]) or Texture:SetAllPoints(["name"]) - Sets all anchor points of the region to match those of another region
- Texture:SetAlpha(alpha) - Sets the opacity of the region relative to its parent
- Texture:SetDrawLayer("layer", sublayer) - Sets the layer at which the region's graphics are drawn relative to others in its frame
- Texture:SetHeight(height) - Sets the region's height
- Texture:SetParent(frame) or Texture:SetParent("name") - Makes another frame the parent of this region
- Texture:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]]) - Sets an anchor point for the region
- Texture:SetSize(width, height) - Sets the size of the region to the specified values
- Texture:SetVertexColor(red, green, blue [, alpha]) - Sets a color shading for the region's graphics
- Texture:SetWidth(width) - Sets the region's width
- Texture:Show() - Shows the region
- Texture:StopAnimating() - Stops any active animations involving the region or its children