View Single Post
10-09-10, 05:11 AM   #7
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
If a person wants something exactly 100x200, he would need to create it first in Photoshop at 100x200, then resize it to the next highest power of 2 for both dimensions which is 128x256 or even higher (yes this stretches the image without keeping aspect ratio), then make this 128x256 as best as possible. In game, code specifies it to be 100x200, and the 128x256 is then scaled down to fit, and it would look best. Even then, 100x200 in wow code doesn't translate to 100x200 pixels on screen. The user may scale up the size of the entire UI (via the UIScale slider in game) and also the user is quite capable of resizing his wow window to any width and height (in window mode) and the entire UI will resize (get squashed or stretched) to fit. Today 12:04 AM
Or, they create the 100x200 texture then increase the canvas size to the appropriate power of 2 size 128x256 and then use :SetTexCoord() to trim off the excess in game. Or merely make an alpha channel that makes the excess area transparent. There are several ways to go about it.

And generally, when wanting to display very large textures you break them down into several texture images and stitch them together by using multiple texture objects in the addon if you do not want to stretch one image across say a 1920x1080 field.
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
  Reply With Quote