WoW:SetTexCoord Transformations: Difference between revisions

m
→‎The Image: Fixed markup
(→‎Inverting T: flipped B and D on the upper-left 2x2 corner of T')
m (→‎The Image: Fixed markup)
Line 12: Line 12:


== The Image ==
== The Image ==
Texture frame elements display images, these are generally loaded from files and are specified with a path. The WoW UI engine handles various different sizes of images, as long as each side is a power of 2 (64x64, 256x256, 512x128, etc). Within an image, we'll use the term <b>Image Coordinate</b> to refer to the location within the contents of the image. The corners are (0,0) for the bottom left, (1,0) for the bottom right, (0,1) for the top left, and (1,1) for the top right. (Aside: Must verify I have these the right way around - [[User:Flickering|Flickering]] 12:13, 13 Jan 2006 (EST))
Texture frame elements display images, these are generally loaded from files and are specified with a path. The WoW UI engine handles various different sizes of images, as long as each side is a power of 2 (64x64, 256x256, 512x128, etc). Within an image, we'll use the term <b>Image Coordinate</b> to refer to the location within the contents of the image. The corners are (0,0) for the <b>top</b> left, (1,0) for the <b>top</b> right, (0,1) for the <b>bottom</b> left, and (1,1) for the <b>bottom</b> right. Notice that the image origin is in a different corner from the screen origin.


While image coordinate box from (0,0) to (1,1) contains the whole image as it appears in its source file, the image logically extends to infinity in each direction, by repeating the edge pixel of the image file. So, if your image has a left edge which is entirely blue pixels, then there would be blue at (x, 0.5) for all x &lt;= 0. Similarly, if the image has a top edge that is transparent, then you'll get transparency at (0.5, y) for all y &gt;= 1.
While image coordinate box from (0,0) to (1,1) contains the whole image as it appears in its source file, the image logically extends to infinity in each direction, by repeating the edge pixel of the image file. So, if your image has a left edge which is entirely blue pixels, then there would be blue at (x, 0.5) for all x &lt;= 0. Similarly, if the image has a top edge that is transparent, then you'll get transparency at (0.5, y) for all y &gt;= 1.
Line 125: Line 125:
  LRy = (-D - AF + CD) / det = ( AF - (1-C)D ) / det
  LRy = (-D - AF + CD) / det = ( AF - (1-C)D ) / det


[[Category:World of Warcraft API]]
[[Category:UI Technical Details]]
Anonymous user