View Single Post
04-26-13, 11:00 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If your actual image is 100x100, increase the canvas size to 256x256 with your image in the top left corner, leaving 156px of blank space below and to the right of it. Then in-game do:

Code:
texture:SetTexture("path\\to\\your\\texture")
texture:SetTexCoord(0, 100/256, 0, 100/256)
... to show only the 100x100 region you actually care about. You don't have to resize your image and lose quality.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote