Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

Returns the region's opacity.

alpha = Region:GetAlpha()
effectiveAlpha = Frame:GetEffectiveAlpha()

Returns[]

alpha
number [0.0 - 1.0] - The alpha of the region. 0 is fully transparent, 1 is fully opaque.
effectiveAlpha
number [0.0 - 1.0] - The effective alpha after propagating from the parent region. This is equal to f: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[]

  • Bc icon 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."

References[]

Advertisement