View Single Post
03-04-16, 04:18 AM   #5
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by zork View Post
Since when do we have this function?
http://wowprogramming.com/docs/widgets/Texture/SetMask

Is it a new api function in legion?

Until now we only had function to mask minimap textures.
For quite a while, I've been using it since late Cata or early MoP. There's a caveat though, if you want to crop/transform a texture by :SetTexCoord(), you first need to remove the mask, if any, transform the texture, and then re-apply the mask.

Lua Code:
  1. texture:SetMask(nil)
  2. texture:SetTexCoord(0, 1, 0, 1)
  3. texture:SetMask("texture-path-here")
__________________

Last edited by lightspark : 03-04-16 at 04:28 AM. Reason: i need some coffee...