Any texture you want to create needs a frame to be created on.
A statusbar is just a subtype of the frame element with an additional set of functions.
Make sure to read all the statusbar functions.
http://wowprogramming.com/docs/widgets/StatusBar
To be honest I really don't understand your issue. The statusbar has a rich set of functions providing possible solutions for anything you want. If it does not have what you are looking for do not use a statusbar at all. Instead use a texture object and apply any transformations manually via :SetTexCoord().
http://wowprogramming.com/docs/widge...re/SetTexCoord
You can create a fake statusbar in oUF and hook the "OnValueChanged" event on the fake statusbar to trigger any math calculations on your texture.
Lua Code:
local fakePowerBar = CreateFrame("Statusbar",nil,self)
local powerBar = self:CreateTexture(nil,"BACKGROUND",nil,-8)
powerBar:SetPoint("RIGHT") --or "LEFT", "TOP", "BOTTOM" ... whatever you need
self.Power = fakePowerBar
local function UpdatePowerBar(...)
print(...)
local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy
local width, height
--calculations are pretty easy. Just take a piece of paper IRL and mark the corners. Now flip it in any direction you want. That is your conversion UL becomes UR and UR becomes UL and so on.
--What is important is since the texture needs to be cut off once you loose value you need to ajust the corners properly.
--Your texture will be stretched to full width/height, thus you need to adjust the size to make it look right.
powerBar:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy)
powerBar:SetSize(width,height)
end
self.Power:SetScript("OnValueChanged", UpdatePowerBar)