![]() |
The API is no longer being updated here until further notice. |
Returns the region's opacity.
alpha = Region:GetAlpha() effectiveAlpha = Frame:GetEffectiveAlpha()
Returns
- alpha
- number
[0.0 - 1.0]- The alpha of the region.0is fully transparent,1is fully opaque. - effectiveAlpha
- number
[0.0 - 1.0]- The effective alpha after propagating from the parent region. This is equal tof:GetAlpha() * f:GetParent():GetAlpha()
Example
Alpha propagates from a region to its children, unless disabled with SetIgnoreParentAlpha.
local parent = CreateFrame("Frame")
parent:SetAlpha(0.5)
local f = CreateFrame("Frame", nil, parent)
f:SetAlpha(0.5)
print(f:GetAlpha()) -- 0.50196081399918
print(f:GetEffectiveAlpha()) -- 0.25098040699959
f:SetIgnoreParentAlpha(true)
print(f:GetEffectiveAlpha()) -- 0.50196081399918
Patch changes
Patch 2.1.0 (2007-05-22): Added GetEffectiveAlpha[1]- "Frame alpha now propagates in the same way as scale (though is clamped between 0 and 1 on each object). This means you can cleanly fade the whole UI or specific frame assemblies."
- "Frame alpha now propagates in the same way as scale (though is clamped between 0 and 1 on each object). This means you can cleanly fade the whole UI or specific frame assemblies."
References
- ^ Iriel 2007-05-15. Upcoming 2.1.0 API Changes - Concise List. WoWInterface.
