API ScriptRegion IsRectValid

Returns true if the region can be positioned on the screen.
 isValid = ScriptRegion:IsRectValid()
==Returns==
:;isValid: - true if the region is a valid rectangle.
==Details==
Valid regions must have either:
* Two opposite corners from or .
* One point from and an explicit size (width, height) from .
For newly created regions, requires the client to have rendered the next frame before the rect is resolved and returns true. This can also be resolved during the same frame by calling / / .
==Example==
Creates a frame and calls AnchorUtil.PrintAnchorGraph. Note that this implicitly calls GetSize.
local f = CreateFrame("Frame", "SomeFrame", UIParent)
f:SetPoint("CENTER")
f:SetSize(100, 100)
print(f:IsRectValid()) -- false
AnchorUtil.PrintAnchorGraph(f)
print(f:IsRectValid()) -- true
AnchorUtil.PrintAnchorGraph(f)
===When rects are resolved===
==Patch changes==