This seems to be the most important part of how it's done by stuf. Doesn't really looks possible with oUF as it is, right?
Code:
do -- statusbar texture orientations
local setwidth = PlayerFrameBackground.SetWidth
local setheight = PlayerFrameBackground.SetHeight
local setcoord = PlayerFrameBackground.SetTexCoord
local setvalues = { -- setvalue functions for various statusbar orientations
h = { normal = {
normal = function(this, w, val) setwidth(this, w) setcoord(this, 0, val, 0, 1) end,
reverse = function(this, w, val) setwidth(this, w) setcoord(this, 1-val, 1, 0, 1) end,
}, hflip = {
normal = function(this, w, val) setwidth(this, w) setcoord(this, 1,0, 1,1, 1-val,0, 1-val,1) end,
reverse = function(this, w, val) setwidth(this, w) setcoord(this, val,0, val,1, 0,0, 0,1) end,
}, vflip = {
normal = function(this, w, val) setwidth(this, w) setcoord(this, 0,1, 0,0, val,1, val,0) end,
reverse = function(this, w, val) setwidth(this, w) setcoord(this, 1-val,1, 1-val,0, 1,1, 1,0) end,
}, hvflip = {
normal = function(this, w, val) setwidth(this, w) setcoord(this, 1,1, 1,0, 1-val,1, 1-val,0) end,
reverse = function(this, w, val) setwidth(this, w) setcoord(this, val,1, val,0, 0,1, 0,0) end,
},
},
v = { normal = {
normal = function(this, h, val) setheight(this, h) setcoord(this, val,0, 0,0, val,1, 0,1) end,
reverse = function(this, h, val) setheight(this, h) setcoord(this, 1,0, 1-val,0, 1,1, 1-val,1) end,
}, hflip = {
normal = function(this, h, val) setheight(this, h) setcoord(this, 1-val,0, 1,0, 1-val,1, 1,1) end,
reverse = function(this, h, val) setheight(this, h) setcoord(this, 0,0, val,0, 0,1, val,1) end,
}, vflip = {
normal = function(this, h, val) setheight(this, h) setcoord(this, val,1, 0,1, val,0, 0,0) end,
reverse = function(this, h, val) setheight(this, h) setcoord(this, 1,1, 1-val,1, 1,0, 1-val,0) end,
}, hvflip = {
normal = function(this, h, val) setheight(this, h) setcoord(this, 1-val,1, 1,1, 1-val,0, 1,0) end,
reverse = function(this, h, val) setheight(this, h) setcoord(this, 0,1, val,1, 0,0, val,0) end,
},
},
}
-------------------------------------------------------------------
function Stuf:GetTexCoordOptions(isvertical, flipoption, isreverse)
-------------------------------------------------------------------
return setvalues[(isvertical and "v") or "h"][flipoption or "normal"][(isreverse and "reverse") or "normal"]
end
end