View Single Post
11-10-10, 10:35 PM   #20
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
I think you should be able to counteract :SetRotation's size change by making your needle texture sqrt(2) times the size of the meter texture behind it.

Would this work?
Code:
local addon = CreateFrame("Frame", "Base2", UIParent)
addon:SetHeight(128)
addon:SetWidth(128)
addon:SetUserPlaced(true)
addon:SetPoint("Center", 100, 0)

local tex = addon:CreateTexture(nil, "ARTWORK")
tex:SetTexture(file)
tex:SetPoint(addon, "CENTER")
local size = sqrt(2) * addon:GetWidth() -- Assuming a square texture
tex:SetSize(size, size)

tex:SetRotation(theta) -- etc
  Reply With Quote