ScriptRegion:GetRect
Jump to navigation
Jump to search
ScriptRegion:GetRect |
||
ScriptRegion:GetScaledRect |
||
ScriptRegion:IsRectValid |
This function is restricted.
|
Returns the coords and size of the region.
left, bottom, width, height = ScriptRegion:GetRect() = ScriptRegion:GetScaledRect()
Returns
Returns nil
if the region has no points.
- left
- number? - Bottom side of the screen to the bottom edge of the region.
- bottom
- number? - Left side of the screen to the left edge of the region.
- width
- number? - Distance between the left and right edges.
- height
- number? - Distance between the bottom and top edges.
Example
GetScaledRect()
is the result of multiplying by GetScale
local f = CreateFrame("Frame")
f:SetPoint("BOTTOMLEFT", 100, 100)
f:SetSize(25, 25)
f:SetScale(2)
print(f:GetRect()) -- 100, 100, 25, 25
print(f:GetScaledRect()) -- 200, 200, 50, 50
Patch changes
Patch 8.2.0 (2019-06-25): Not allowed on restricted frames.
Patch 8.1.0 (2018-12-11): Added GetScaledRect
Patch 2.0.1 (2006-12-05): Added GetRect[1]