Thank you semlar. I've actually never heard of or used region:SetSize(). oO
That definitely helps a lot.
Today I came up with a complete different way to show undistorted textures of this shape. But be warned .... it's kind of a bad hack. If you are of a sensitive mind then you shouldn't read further.
Nevertheless ... here it is:
Lua Code:
tFrame = CreateFrame("Frame", UIParent)
tFrame:SetPoint("CENTER", UIParent, "CENTER")
tFrame:SetHeight(200)
tFrame:SetWidth(200)
tFrame:Show()
tTex = tFrame:CreateTexture("t0","OVERLAY")
tTex:SetTexture("Interface\\icons\\ability_ambush")
tTex:SetHeight(1)
tTex:SetWidth(tFrame:GetWidth())
tTex:SetPoint("TOP", tFrame, "TOP", 0, 0)
tTex:SetTexCoord(0, 1, 0, 1 / tFrame:GetHeight())
tTex:Show()
for x = 1, tFrame:GetHeight() do
tTex = tFrame:CreateTexture("t"..x,"OVERLAY")
tTex:SetTexture("Interface\\icons\\ability_ambush")
tTex:SetHeight(1)
tTex:SetWidth(tFrame:GetWidth())
tTex:SetPoint("TOP", _G["t"..(x - 1)], "BOTTOM")
tTex:SetTexCoord(-((1 / tFrame:GetHeight()) * x), 1 + (1 / tFrame:GetHeight()) * x, (1 / tFrame:GetHeight()) * x, ((1 / tFrame:GetHeight()) * x) + (1 / tFrame:GetHeight()))
tTex:Show()
end
It just comprises the full texture of a lot of single line textures. Should be easy to write a SetTexture wrapper function to set and handle those 'textures'.
Unfortunately it raises new problems. I'm rotating the parent frame of the textures, and as we know the animation thingi is a great mess. It can't handle textures that are not anchored to the center of the parent widget.
And yes, I know, creating 200 textures to show a single one is a big waste of ressources.