Originally Posted by myrroddin
If I wanted the Warrior icon, I'd use 0/4, 1/4, 0, 3/4 correct? Or at least nearly enough that I could figure it out once I plug it into code.
|
Values are normalized from 0 to 1. 0 is either the left edge, or the top edge. 1 is the right edge or bottom edge. 0.5 is right in the middle, 0.25 is closer to the left or top, 0.9 is close to the right or bottom.
For example, to trim the beveled edges off Blizzard icons, you'll see a lot of
icon:SetTexCoord(0.07, 0.93, 0.07, 0.93) in addons.
You don't have to use fractions (you'll see values like 0.64189753247 in Blizzard code) but it tends to be easier to write 18/64 or something than to calculate the decimal value yourself and write it all in.