Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

AtlasID

From Wowpedia
Jump to: navigation, search

Atlases allow for easily getting part of a texture without having to use tex coords and can automatically specify size.

Examples

Texture:SetAtlas

Shows the Paladin class trial icon on the screen

-- create texture
local f = CreateFrame("Frame")
f:SetSize(1, 1)
f:SetPoint("CENTER")
local tex = f:CreateTexture()
tex:SetPoint("CENTER")

-- set the atlas and use atlas size
tex:SetAtlas("ClassTrial-Paladin-Ring", true)
-- which is equivalent to setting a texture, size and tex coords
tex:SetTexture("Interface/Glues/AccountUpgrade/ClassTrialThanksFrame")
tex:SetSize(188, 188)
tex:SetTexCoord(0.186523, 0.370117, 0.339844, 0.523438)
-- https://www.townlong-yak.com/framexml/8.1.5/Helix/AtlasInfo.lua#3362
["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")

API CreateAtlasMarkup.png

Patch changes

See also

References

Rygarius 2014-07-10. 6.0 UI Add-On Changes - Updated Aug 4.