View Single Post
02-29-16, 02:15 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You can use any built in Blizzard textures to mask another texture, SetPortraitTexture works very similar, it masks a round circle on the square race icons.

There is a hexagon texture, masked with the HOTS icon from the game:

Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent)
  2. frame:SetPoint("Center", 0, 0)
  3. frame:SetSize(100, 100)
  4.  
  5. local icon = frame:CreateTexture("Texture", "Background")
  6. icon:SetTexture("Interface\\Icons\\Ability_Ambush")
  7. icon:SetMask("Interface\\ChatFrame\\UI-ChatIcon-HotS")
  8. icon:SetAllPoints(frame)

The problem is that the resolution/edges are highly based on the quailty of the masker AND the original image.

Another instresting masker images:

Lua Code:
  1. icon:SetMask("Interface\\DialogFrame\\DialogAlertIcon")
  2. icon:SetMask("Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew")
  3. icon:SetMask("Interface\\GuildFrame\\GuildLogoMask_R")
  4. icon:SetMask("Interface\\ARCHEOLOGY\\Arch-Keystone-Mask")
  5. icon:SetMask("Interface\\GLUES\\Models\\UI_Dwarf\\UI_Goblin_GodRaysMask")
  6. icon:SetMask("Interface\\GLUES\\Models\\UI_DeathKnight\\IceCrown_CloudsA02_MASK01")
  7. icon:SetMask("Interface\\FriendsFrame\\PlusManz-Horde")

The possibilites are endless.

Last edited by Resike : 02-29-16 at 02:39 PM.