An atlas is a texture containing sub-textures (atlas members) to reduce overhead. They make it easier to get part of a texture instead of using tex coords.
Example
Texture:SetAtlas
Shows the Paladin class trial icon on the screen
-- create texture
local f = CreateFrame("Frame")
f:SetSize(1, 1)
f:SetPoint("CENTER")
f.tex = f:CreateTexture()
f.tex:SetPoint("CENTER")
-- set the atlas and use atlas size
f.tex:SetAtlas("ClassTrial-Paladin-Ring", true)
-- which is equivalent to setting a texture, size and tex coords
f.tex:SetTexture("Interface/Glues/AccountUpgrade/ClassTrialThanksFrame")
f.tex:SetSize(188, 188)
f.tex:SetTexCoord(0.186523, 0.370117, 0.339844, 0.523438)
This can be referenced in Helix/AtlasInfo.lua
["Interface/Glues/AccountUpgrade/ClassTrialThanksFrame"]={ ["ClassTrial-Paladin-Ring"]={188, 188, 0.186523, 0.370117, 0.339844, 0.523438, false, false},
CreateAtlasMarkup
Prints a shield into the chat window
print(CreateAtlasMarkup("roleicon-tiny-tank"), "roleicon-tiny-tank")
print(CreateAtlasMarkup("groupfinder-icon-role-large-tank", 16, 16), "groupfinder-icon-role-large-tank")
Patch changes
- Patch 6.0.2 (2014-10-14): Added.
See also
In-game
- C_Texture.GetAtlasInfo, GetAtlas, SetAtlas
- CreateAtlasMarkup - Shows atlases as an UI escape sequence
- Texture Atlas Viewer - Addon for browsing atlases in-game
Out of game
- Helix/AtlasInfo.lua - Lua table with atlases
- UiTextureAtlasMember.db2 - DBC for atlases
References
- Rygarius 2014-07-10. 6.0 UI Add-On Changes - Updated Aug 4.